Change in osmo-sgsn[master]: LLC: Don't blindly assume all LLC frames have data payload
gerrit-no-reply at lists.osmocom.org
Wed Apr 24 07:50:26 UTC 2019
Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/13764 )
Change subject: LLC: Don't blindly assume all LLC frames have data payload
Patch Set 2:
PS2, Line 961: /* set l3 layer & remove the fcs */
> so do we need the fcs for kind of messages where there's not l3? […]
there is FCS in any LLC frame, as the FCS covers both header and payload, right?
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.
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.
To view, visit https://gerrit.osmocom.org/13764
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Owner: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder (1000002)
Gerrit-Reviewer: Keith Whyte <keith at rhizomatica.org>
Gerrit-CC: Pau Espin Pedrol <pespin at sysmocom.de>
Gerrit-Comment-Date: Wed, 24 Apr 2019 07:50:26 +0000
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the gerrit-log