<p><a href="https://gerrit.osmocom.org/13764">View Change</a></p><p>1 comment:</p><ul style="list-style: none; padding: 0;"><li style="margin: 0; padding: 0;"><p><a href="https://gerrit.osmocom.org/#/c/13764/2/src/gprs/gprs_llc.c">File src/gprs/gprs_llc.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/13764/2/src/gprs/gprs_llc.c@961">Patch Set #2, Line 961:</a> <code style="font-family:monospace,monospace">          /* set l3 layer & remove the fcs */</code></p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;">so do we need the fcs for kind of messages where there's not l3? […]</blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">there is FCS in any LLC frame, as the FCS covers both header and payload, right?</p><p style="white-space: pre-wrap; word-wrap: break-word;">The problam is not setting msg->l3h to NULL.  The problem is to then call a msgb_l3trim() on a msgb that has l3h set to ?NULL.  Of course we could also make msgb_l3trim() handle the l3 case == NULL.  But I actually think that would  be hiding unintended behavior.  If at all, I would make msgb_l3trim() ASSERT in case somebody passes a msgb with l3h = NULL.</p><p style="white-space: pre-wrap; word-wrap: break-word;">The only thing that one *could* improve here is to remove the 3 byte FCS even for those messages without user data (i.e. llhp.data = NULL).  Right now we don't do that, but then any downstream code (even future one) doesn't care on what's in the msgb, as the only relevant information is in the already-parsed llhp.</p></li></ul></li></ul><p>To view, visit <a href="https://gerrit.osmocom.org/13764">change 13764</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/13764"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: osmo-sgsn </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-MessageType: comment </div>
<div style="display:none"> Gerrit-Change-Id: I51bbd0f2c618d477a037af343ff41de1c8a5a3ae </div>
<div style="display:none"> Gerrit-Change-Number: 13764 </div>
<div style="display:none"> Gerrit-PatchSet: 2 </div>
<div style="display:none"> Gerrit-Owner: Harald Welte <laforge@gnumonks.org> </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: Keith Whyte <keith@rhizomatica.org> </div>
<div style="display:none"> Gerrit-CC: Pau Espin Pedrol <pespin@sysmocom.de> </div>
<div style="display:none"> Gerrit-Comment-Date: Wed, 24 Apr 2019 07:50:26 +0000 </div>
<div style="display:none"> Gerrit-HasComments: Yes </div>
<div style="display:none"> Gerrit-HasLabels: No </div>