diff options
author | Alexander Couzens <lynxis@fe80.eu> | 2018-09-18 20:01:28 +0200 |
---|---|---|
committer | Alexander Couzens <lynxis@fe80.eu> | 2018-09-18 20:01:28 +0200 |
commit | 859a3f8e7f066c7b14c6ce51ac517ccff025a835 (patch) | |
tree | 53a7db46fab89508db9f7798757f4de2742f3fae | |
parent | 558bad2f6511c342090df48c41b0ba6649c607b1 (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
-rw-r--r-- | src/gprs/gprs_llc.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/gprs/gprs_llc.c b/src/gprs/gprs_llc.c index 6c92f8334..abbb74278 100644 --- a/src/gprs/gprs_llc.c +++ b/src/gprs/gprs_llc.c @@ -945,6 +945,9 @@ int gprs_llc_rcvmsg(struct msgb *msg, struct tlv_parsed *tv) LOGP(DLLC, LOGL_INFO, "Dropping frame with invalid FCS\n"); return -EIO; } + /* set l3 layer & remove the fcs */ + msg->l3h = llhp.data; + msgb_l3trim(msg, llhp.data_len); /* Update LLE's (BVCI, NSEI) tuple */ lle->llme->bvci = msgb_bvci(msg); @@ -960,7 +963,6 @@ int gprs_llc_rcvmsg(struct msgb *msg, struct tlv_parsed *tv) /* llhp.data is only set when we need to send LL_[UNIT]DATA_IND up */ if (llhp.cmd == GPRS_LLC_UI && llhp.data && llhp.data_len) { - msgb_gmmh(msg) = llhp.data; switch (llhp.sapi) { case GPRS_SAPI_GMM: /* send LL_UNITDATA_IND to GMM */ |