mirror of
https://gerrit.osmocom.org/osmo-gbproxy
synced 2024-08-18 08:56:23 +00:00
[gsm_04_08] Fix gsm48_send_rr_ciph_mode algorithm ID
The algorithm ID used in the GSM 04.08 RR message is (x-1) for A5/x. In RSL it's (x+1) for A5/x so there is a difference of 2. Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
This commit is contained in:
parent
cca253a7c4
commit
a948c11c76
1 changed files with 1 additions and 1 deletions
|
@ -1699,7 +1699,7 @@ int gsm48_send_rr_ciph_mode(struct gsm_lchan *lchan)
|
|||
if (lchan->encr.alg_id <= RSL_ENC_ALG_A5(0))
|
||||
ciph_mod_set = 0;
|
||||
else
|
||||
ciph_mod_set = (lchan->encr.alg_id-1)<<1 | 1;
|
||||
ciph_mod_set = (lchan->encr.alg_id-2)<<1 | 1;
|
||||
|
||||
gh = (struct gsm48_hdr *) msgb_put(msg, sizeof(*gh) + 1);
|
||||
gh->proto_discr = GSM48_PDISC_RR;
|
||||
|
|
Loading…
Reference in a new issue