Removing FCS from SNDCP packages

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/osmocom-net-gprs@lists.osmocom.org/.

Holger Freyther holger at freyther.de
Tue May 9 12:12:42 UTC 2017


Hi,

I see that while adding decompression support dexter has fixed a bug in
the sndcp code. Before the GTP-U frame would include the LLC FCS and now
we do this:

	npdu_len = (msg->data + msg->len) - npdu - 3;

What I wonder (and the commit message didn't say is) was the fragment
part handled as well. The calculation is:

        /* make sure to subtract length of SNDCP header from 'len' */
        rc = defrag_enqueue(sne, suh->seg_nr, data, len - (data - hdr)); 

and len is passed in from the TLV struct in gprs_llc_rcvmsg. I think the
fragmented case is working okay.

Shall we try to unify the length calculation to rely on the local "len"
variable instead of checking msg->data+msg->len?


cheers
	holger



More information about the osmocom-net-gprs mailing list