From 410bc9be9db06d005dc3423f2f9b0432974900fa Mon Sep 17 00:00:00 2001 From: Alexander Couzens Date: Tue, 18 Sep 2018 20:01:28 +0200 Subject: gprs_llc: remove the FCS from the msgb by trim'ing the msgb After checking the FCS, it's no use. The FCS should also not appear on `hexdump(msgb_l3(MSG), msgb_l3len(MSG))`. Change-Id: I27e061ead86395a336b67c7aead93d305a0f2ae8 --- src/gprs/gprs_sndcp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/gprs/gprs_sndcp.c') diff --git a/src/gprs/gprs_sndcp.c b/src/gprs/gprs_sndcp.c index 77f8ca663..52eeb75d5 100644 --- a/src/gprs/gprs_sndcp.c +++ b/src/gprs/gprs_sndcp.c @@ -792,7 +792,7 @@ int sndcp_llunitdata_ind(struct msgb *msg, struct gprs_llc_lle *lle, npdu_num = (suh->npdu_high << 8) | suh->npdu_low; npdu = (uint8_t *)suh + sizeof(*suh); - npdu_len = (msg->data + msg->len) - npdu - 3; /* -3 'removes' the FCS */ + npdu_len = (msg->data + msg->len) - npdu; if (npdu_len <= 0) { LOGP(DSNDCP, LOGL_ERROR, "Short SNDCP N-PDU: %d\n", npdu_len); -- cgit v1.2.3