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/include | |
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/include')
-rw-r--r-- | openbsc/include/openbsc/gprs_gmm.h | 5 | ||||
-rw-r--r-- | openbsc/include/openbsc/gprs_llc.h | 3 |
2 files changed, 6 insertions, 2 deletions
diff --git a/openbsc/include/openbsc/gprs_gmm.h b/openbsc/include/openbsc/gprs_gmm.h index 044978b0a..8a3ffea41 100644 --- a/openbsc/include/openbsc/gprs_gmm.h +++ b/openbsc/include/openbsc/gprs_gmm.h @@ -4,13 +4,16 @@ #include <osmocom/core/msgb.h> #include <openbsc/gprs_sgsn.h> +#include <stdbool.h> + int gsm48_tx_gsm_deact_pdp_req(struct sgsn_pdp_ctx *pdp, uint8_t sm_cause); int gsm48_tx_gsm_act_pdp_rej(struct sgsn_mm_ctx *mm, uint8_t tid, uint8_t cause, uint8_t pco_len, uint8_t *pco_v); int gsm48_tx_gsm_act_pdp_acc(struct sgsn_pdp_ctx *pdp); int gsm48_tx_gsm_deact_pdp_acc(struct sgsn_pdp_ctx *pdp); -int gsm0408_gprs_rcvmsg_gb(struct msgb *msg, struct gprs_llc_llme *llme); +int gsm0408_gprs_rcvmsg_gb(struct msgb *msg, struct gprs_llc_llme *llme, + bool drop_cipherable); int gsm0408_gprs_force_reattach(struct sgsn_mm_ctx *mmctx); int gsm0408_gprs_force_reattach_oldmsg(struct msgb *msg, struct gprs_llc_llme *llme); diff --git a/openbsc/include/openbsc/gprs_llc.h b/openbsc/include/openbsc/gprs_llc.h index d7a480bf4..0e497a080 100644 --- a/openbsc/include/openbsc/gprs_llc.h +++ b/openbsc/include/openbsc/gprs_llc.h @@ -2,6 +2,7 @@ #define _GPRS_LLC_H #include <stdint.h> +#include <stdbool.h> #include <openbsc/gprs_sgsn.h> /* Section 4.7 LLC Layer Structure */ @@ -211,7 +212,7 @@ int gprs_llc_rcvmsg(struct msgb *msg, struct tlv_parsed *tv); /* LL-UNITDATA.req */ int gprs_llc_tx_ui(struct msgb *msg, uint8_t sapi, int command, - void *mmctx); + struct sgsn_mm_ctx *mmctx, bool encryptable); /* Chapter 7.2.1.2 LLGMM-RESET.req */ int gprs_llgmm_reset(struct gprs_llc_llme *llme); |