<blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;"><p style="white-space: pre-wrap; word-wrap: break-word;">In current osmo-msc refactoring, I have the same checks in place,<br>except my version discards the messages completely.<br>http://git.osmocom.org/osmo-msc/tree/src/libmsc/nas_a.c?h=neels/ho#n555</p><p style="white-space: pre-wrap; word-wrap: break-word;">Maybe we should truncate if extra bytes are present, and discard if<br>too few bytes are present? What do you think?</p></blockquote><p style="white-space: pre-wrap; word-wrap: break-word;">I had a look at your code. To me it looks ok to discard the whole message if there is excess data as it either means that the message was damaged of the receiving end has some significant problems. However, the ticket that is related to the task says that the message should only be truncated: http://osmocom.org/issues/3806</p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;"><p style="white-space: pre-wrap; word-wrap: break-word;">Either way let's avoid the merge conflict and not merge this<br>version. Rather apply to branch neels/ho file nas_a.c.</p></blockquote><p style="white-space: pre-wrap; word-wrap: break-word;">I am fine with abandoning this, if it avoids merge conflicts.</p><p><a href="https://gerrit.osmocom.org/13307">View Change</a></p><p>3 comments:</p><ul style="list-style: none; padding: 0;"><li style="margin: 0; padding: 0;"><p><a href="https://gerrit.osmocom.org/#/c/13307/1//COMMIT_MSG">Commit Message:</a></p><ul style="list-style: none; padding: 0;"><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.osmocom.org/#/c/13307/1//COMMIT_MSG@7">Patch Set #1, Line 7:</a> <code style="font-family:monospace,monospace">bssmap</code></p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;">bssmap</blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">Done</p></li></ul></li><li style="margin: 0; padding: 0;"><p><a href="https://gerrit.osmocom.org/#/c/13307/1/src/libmsc/a_iface_bssap.c">File src/libmsc/a_iface_bssap.c:</a></p><ul style="list-style: none; padding: 0;"><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.osmocom.org/#/c/13307/1/src/libmsc/a_iface_bssap.c@721">Patch Set #1, Line 721:</a> </p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;"><pre style="font-family: monospace,monospace; white-space: pre-wrap;">_header = (struct bssmap_header *)msg->l2h;<br><br></pre></blockquote></p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;">on the MSC side we cannot have log messages without any context. […]</blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">Done</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.osmocom.org/#/c/13307/1/src/libmsc/a_iface_bssap.c@722">Patch Set #1, Line 722:</a> <code style="font-family:monospace,monospace"></code></p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;">Same as other patch: "extraneous". Better use "extra".</blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">Done</p></li></ul></li></ul><p>To view, visit <a href="https://gerrit.osmocom.org/13307">change 13307</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.osmocom.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.osmocom.org/13307"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: osmo-msc </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-MessageType: comment </div>
<div style="display:none"> Gerrit-Change-Id: I3b89dd5a66ec83b03860b58b6b8eb58007f433a4 </div>
<div style="display:none"> Gerrit-Change-Number: 13307 </div>
<div style="display:none"> Gerrit-PatchSet: 5 </div>
<div style="display:none"> Gerrit-Owner: dexter <pmaier@sysmocom.de> </div>
<div style="display:none"> Gerrit-Reviewer: Harald Welte <laforge@gnumonks.org> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins Builder (1000002) </div>
<div style="display:none"> Gerrit-Reviewer: Neels Hofmeyr <nhofmeyr@sysmocom.de> </div>
<div style="display:none"> Gerrit-Reviewer: Pau Espin Pedrol <pespin@sysmocom.de> </div>
<div style="display:none"> Gerrit-Reviewer: dexter <pmaier@sysmocom.de> </div>
<div style="display:none"> Gerrit-Comment-Date: Mon, 01 Apr 2019 15:12:31 +0000 </div>
<div style="display:none"> Gerrit-HasComments: Yes </div>
<div style="display:none"> Gerrit-HasLabels: No </div>