diff options
author | Max <msuraev@sysmocom.de> | 2016-07-06 11:59:18 +0200 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2016-07-16 23:17:58 +0000 |
commit | 82040101ebcc6350f53a9e0853418a9bc597963a (patch) | |
tree | f263bc4328886718615139809af9d13ac4b39a1b /openbsc/src/gprs/gprs_sndcp.c | |
parent | b997f8444313ff7ab99d66b400fc79cae8302166 (diff) |
SGSN: encrypt/decrypt only necessary frames
According to 3GPP TS 24.008 ยง 4.7.1.2 some GMM frames are not supposed
to be ciphered. Propagate information about the necessity for
encryption between MM <-> LLC to ensure only proper frames are
encrypted/decrypted/dropped.
Change-Id: I0358905e60d1b182f75caec81bfcc72bbbbb2aa1
Related: OS#1582
Diffstat (limited to 'openbsc/src/gprs/gprs_sndcp.c')
-rw-r--r-- | openbsc/src/gprs/gprs_sndcp.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/openbsc/src/gprs/gprs_sndcp.c b/openbsc/src/gprs/gprs_sndcp.c index 46d779b4c..75f95c9c4 100644 --- a/openbsc/src/gprs/gprs_sndcp.c +++ b/openbsc/src/gprs/gprs_sndcp.c @@ -22,6 +22,7 @@ #include <errno.h> #include <stdint.h> +#include <stdbool.h> #include <osmocom/core/msgb.h> #include <osmocom/core/linuxlist.h> @@ -417,7 +418,7 @@ static int sndcp_send_ud_frag(struct sndcp_frag_state *fs) /* set the MORE bit of the SNDCP header accordingly */ sch->more = more; - rc = gprs_llc_tx_ui(fmsg, lle->sapi, 0, fs->mmcontext); + rc = gprs_llc_tx_ui(fmsg, lle->sapi, 0, fs->mmcontext, true); /* abort in case of error, do not advance frag_nr / next_byte */ if (rc < 0) { msgb_free(fs->msg); @@ -498,7 +499,7 @@ int sndcp_unitdata_req(struct msgb *msg, struct gprs_llc_lle *lle, uint8_t nsapi sch->type = 1; sch->nsapi = nsapi; - return gprs_llc_tx_ui(msg, lle->sapi, 0, mmcontext); + return gprs_llc_tx_ui(msg, lle->sapi, 0, mmcontext, true); } /* Section 5.1.2.17 LL-UNITDATA.ind */ |