diff options
author | Sylvain Munaut <tnt@246tNt.com> | 2019-03-14 11:02:36 +0100 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2019-03-19 15:24:01 +0000 |
commit | da9f37ed201be1fc12f6bbf8621fe489056d9012 (patch) | |
tree | b205ef5712583a53ddcded15bf153ac0082680c7 /src/libmsc/gsm_04_08.c | |
parent | 31f4c1f927352a5e50348b80bb61f3c8b4cdc799 (diff) |
libvlr: Allow 2G auth tuples to be re-used without going through AUTH
If the key_seq we get in the first messages matches the last_tuple, then
both we and the MS already know the key to use and we don't need the
AUTH REQUEST/RESPONSE cycle.
Security wise ... not so good, and so IMHO the 'auth required' option
in the MSC should always be set. But this allows to turn on ciphering on
a channel without doing any MM transaction, and so the MS doesn't turn
on the T3240 timer which allows to have a ciphered silent-call channel
that won't timeout.
Change-Id: Ief840a2ae7a0ffd2bf0bf726f209a79e3f787646
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
Diffstat (limited to 'src/libmsc/gsm_04_08.c')
-rw-r--r-- | src/libmsc/gsm_04_08.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/libmsc/gsm_04_08.c b/src/libmsc/gsm_04_08.c index c6e5528af..09744db69 100644 --- a/src/libmsc/gsm_04_08.c +++ b/src/libmsc/gsm_04_08.c @@ -433,6 +433,7 @@ int mm_rx_loc_upd_req(struct ran_conn *conn, struct msgb *msg) &old_lai, &new_lai, is_utran || conn->network->authentication_required, is_utran || conn->network->a5_encryption_mask > 0x01, + lu->key_seq, classmark1_is_r99(&lu->classmark1), is_utran, net->vlr->cfg.assign_tmsi); @@ -820,6 +821,7 @@ int gsm48_rx_mm_serv_req(struct ran_conn *conn, struct msgb *msg) VLR_PR_ARQ_T_CM_SERV_REQ, mi-1, &lai, is_utran || conn->network->authentication_required, is_utran || conn->network->a5_encryption_mask > 0x01, + req->cipher_key_seq, classmark2_is_r99(classmark2, classmark2_len), is_utran); @@ -1178,6 +1180,8 @@ static int gsm48_rx_rr_pag_resp(struct ran_conn *conn, struct msgb *msg) { struct gsm_network *net = conn->network; struct gsm48_hdr *gh = msgb_l3(msg); + struct gsm48_pag_resp *pr = + (struct gsm48_pag_resp *)gh->data; uint8_t classmark2_len = gh->data[1]; uint8_t *classmark2 = gh->data+2; uint8_t *mi_lv = classmark2 + classmark2_len; @@ -1209,6 +1213,7 @@ static int gsm48_rx_rr_pag_resp(struct ran_conn *conn, struct msgb *msg) VLR_PR_ARQ_T_PAGING_RESP, mi_lv, &lai, is_utran || conn->network->authentication_required, is_utran || conn->network->a5_encryption_mask > 0x01, + pr->key_seq, classmark2_is_r99(classmark2, classmark2_len), is_utran); |