Stefan Sperling has posted comments on this change. ( 
https://gerrit.osmocom.org/12349 )

Change subject: improve handling of BSC-chosen algo in CIPHER MODE COMPLETE
......................................................................


Patch Set 2:

(4 comments)

https://gerrit.osmocom.org/#/c/12349/2/include/osmocom/msc/gsm_04_08.h
File include/osmocom/msc/gsm_04_08.h:

https://gerrit.osmocom.org/#/c/12349/2/include/osmocom/msc/gsm_04_08.h@80
PS2, Line 80: struct gsm_classmark;
> Why not simply #include ran_conn. […]
Yes that works, too. Done in next patch set.


https://gerrit.osmocom.org/#/c/12349/2/src/libmsc/a_iface_bssap.c
File src/libmsc/a_iface_bssap.c:

https://gerrit.osmocom.org/#/c/12349/2/src/libmsc/a_iface_bssap.c@405
PS2, Line 405:  } else {
> I'd suggest keeping the comment but dropping empty else {}
Fine, I don't mind either way.


https://gerrit.osmocom.org/#/c/12349/2/src/libmsc/a_iface_bssap.c@410
PS2, Line 410:  for (i = 0; i < 8; i++) {
> If I understood correctly where this limit comes from, than better to use 
> ENCRY_INFO_PERM_ALGO_MAXLE […]
This was copied from existing code in gsm_04_08.c. I'll fix it there, too.


https://gerrit.osmocom.org/#/c/12349/2/src/libmsc/a_iface_bssap.c@440
PS2, Line 440:                  LOGPCONN(conn, LOGL_ERROR, "Unsupported 
encryption algorithm in CIHPER MODE COMPLETE: A5/%d\n", alg_id);
> Better use gsm0808_chosen_enc_alg_names.
No, gsm0808_chosen_enc_alg_names is for GSM0808_IE_CHOSEN_ENCR_ALG values.
alg_id is a VLR_CIPH_* value so we'd better use vlr_ciph_names.

I just noticed a bug above: perm_algo[j] is also an IE value, not a 
vlr_cipher_name.
So we can't compare them directly. Will fix this, and rename the alg_id 
variable for clarity as well.



--
To view, visit https://gerrit.osmocom.org/12349
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I3260bee43cfe135ebfc33c13aee3c4ba43466c81
Gerrit-Change-Number: 12349
Gerrit-PatchSet: 2
Gerrit-Owner: Stefan Sperling <[email protected]>
Gerrit-Reviewer: Jenkins Builder (1000002)
Gerrit-Reviewer: Max <[email protected]>
Gerrit-Reviewer: Stefan Sperling <[email protected]>
Gerrit-Comment-Date: Wed, 19 Dec 2018 11:23:35 +0000
Gerrit-HasComments: Yes
Gerrit-HasLabels: No

Reply via email to