aboutsummaryrefslogtreecommitdiffstats
path: root/src/gprs/gprs_sndcp.c
diff options
context:
space:
mode:
authorAlexander Couzens <lynxis@fe80.eu>2018-09-18 20:01:28 +0200
committerlynxis lazus <lynxis@fe80.eu>2018-10-04 08:29:27 +0000
commit410bc9be9db06d005dc3423f2f9b0432974900fa (patch)
tree89a1d52ad29aa30ea68052d8e682bb9bcf61e17c /src/gprs/gprs_sndcp.c
parent8e168605b2b0dbcffcb0c61232605ce403d357cb (diff)
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
Diffstat (limited to 'src/gprs/gprs_sndcp.c')
-rw-r--r--src/gprs/gprs_sndcp.c2
1 files changed, 1 insertions, 1 deletions
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);