diff options
author | Sylvain Munaut <tnt@246tNt.com> | 2009-09-27 11:11:41 +0200 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2009-09-27 11:11:41 +0200 |
commit | 1dcfc00192ac507d7a1980658f22de3f925310e8 (patch) | |
tree | 51082c08d706ac739066e26fb12188381f428c25 /openbsc/src | |
parent | 4381cfe41b123bf201e2e22735e2ff038bb8a05b (diff) |
[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>
Diffstat (limited to 'openbsc/src')
-rw-r--r-- | openbsc/src/gsm_04_08.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/openbsc/src/gsm_04_08.c b/openbsc/src/gsm_04_08.c index 30c2db39d..6eb49c2b5 100644 --- a/openbsc/src/gsm_04_08.c +++ b/openbsc/src/gsm_04_08.c @@ -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; |