Attention is currently required from: pespin. fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/27507 )
Change subject: gsm48_make_ho_cmd(): optionally add Cipher Mode Setting IE ......................................................................
Patch Set 1:
(2 comments)
File src/osmo-bsc/gsm_04_08_rr.c:
https://gerrit.osmocom.org/c/osmo-bsc/+/27507/comment/e0dddade_7544a434 PS1, Line 584: if (new_lchan->encr.alg_id > ALG_A5_NR_TO_RSL(0))
Looks like we want this stuff as "lchan_get_cms()" put somewhere and reuse here and gsm48_send_rr_ci […]
This calculation is performed only two times, and both in this file. I hope after my https://gerrit.osmocom.org/c/osmo-bsc/+/27509 is merged, the formula gets cleaner and easier to read.
https://gerrit.osmocom.org/c/osmo-bsc/+/27507/comment/dd91f366_c86d545d PS1, Line 585: (new_lchan->encr.alg_id - 2) << 1 Hi Neels,
If I were to write this from scratch, I'd have rather stored the plain A5/n number in encr.alg_id (as encr.alg_a5). Since we have alg_id around everywhere already, I think it would be nice to have a macro like ALG_A5_NR_TO_RSL() or a seprate function to explicitly show the intended conversion.
This is exactly why I submitted:
https://gerrit.osmocom.org/c/osmo-bsc/+/27509
because it's so confusing that we store it in the RSL specific format, and then print it as-is in some logging statements without any conversion...