Change in osmo-bsc[master]: cipher mode reject: send proper cause codes
Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/11438 ) Change subject: cipher mode reject: send proper cause codes .. cipher mode reject: send proper cause codes bssmap_handle_cipher_mode() had code paths doing "goto reject" without setting a meaningful cause value. Related: OS#3186 Change-Id: Ia608fa34a6a2d3035a66d05fbc38553ac5186804 --- M src/osmo-bsc/osmo_bsc_bssap.c 1 file changed, 3 insertions(+), 0 deletions(-) Approvals: Jenkins Builder: Verified Harald Welte: Looks good to me, approved diff --git a/src/osmo-bsc/osmo_bsc_bssap.c b/src/osmo-bsc/osmo_bsc_bssap.c index 48af06b..6b7a682 100644 --- a/src/osmo-bsc/osmo_bsc_bssap.c +++ b/src/osmo-bsc/osmo_bsc_bssap.c @@ -444,6 +444,7 @@ if (conn->ciphering_handled) { LOGP(DMSC, LOGL_ERROR, "Already seen ciphering command. Protocol Error.\n"); + reject_cause = GSM0808_CAUSE_PROTOCOL_ERROR_BETWEEN_BSS_AND_MSC; goto reject; } @@ -452,6 +453,7 @@ tlv_parse(, gsm0808_att_tlvdef(), msg->l4h + 1, payload_length - 1, 0, 0); if (!TLVP_PRESENT(, GSM0808_IE_ENCRYPTION_INFORMATION)) { LOGP(DMSC, LOGL_ERROR, "IE Encryption Information missing.\n"); + reject_cause = GSM0808_CAUSE_INFORMATION_ELEMENT_OR_FIELD_MISSING; goto reject; } @@ -464,6 +466,7 @@ len = TLVP_LEN(, GSM0808_IE_ENCRYPTION_INFORMATION); if (len < 1) { LOGP(DMSC, LOGL_ERROR, "IE Encryption Information is too short.\n"); + reject_cause = GSM0808_CAUSE_INCORRECT_VALUE; goto reject; } -- To view, visit https://gerrit.osmocom.org/11438 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: Ia608fa34a6a2d3035a66d05fbc38553ac5186804 Gerrit-Change-Number: 11438 Gerrit-PatchSet: 3 Gerrit-Owner: osmith Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (102)
Change in osmo-bsc[master]: cipher mode reject: send proper cause codes
osmith has uploaded a new patch set (#2). ( https://gerrit.osmocom.org/11438 ) Change subject: cipher mode reject: send proper cause codes .. cipher mode reject: send proper cause codes bssmap_handle_cipher_mode() had code paths doing "goto reject" without setting a meaningful cause value. Related: OS#3186 Change-Id: Ia608fa34a6a2d3035a66d05fbc38553ac5186804 --- M src/osmo-bsc/osmo_bsc_bssap.c 1 file changed, 3 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/38/11438/2 -- To view, visit https://gerrit.osmocom.org/11438 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ia608fa34a6a2d3035a66d05fbc38553ac5186804 Gerrit-Change-Number: 11438 Gerrit-PatchSet: 2 Gerrit-Owner: osmith Gerrit-CC: Jenkins Builder (102)
Change in osmo-bsc[master]: cipher mode reject: send proper cause codes
osmith has uploaded this change for review. ( https://gerrit.osmocom.org/11438 Change subject: cipher mode reject: send proper cause codes .. cipher mode reject: send proper cause codes bssmap_handle_cipher_mode() had code paths doing "goto reject" without setting a meaningful cause value. Related: OS#3186 Change-Id: Ia608fa34a6a2d3035a66d05fbc38553ac5186804 --- M src/osmo-bsc/osmo_bsc_bssap.c 1 file changed, 3 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/38/11438/1 diff --git a/src/osmo-bsc/osmo_bsc_bssap.c b/src/osmo-bsc/osmo_bsc_bssap.c index 1e97f33..9419f56 100644 --- a/src/osmo-bsc/osmo_bsc_bssap.c +++ b/src/osmo-bsc/osmo_bsc_bssap.c @@ -444,6 +444,7 @@ if (conn->ciphering_handled) { LOGP(DMSC, LOGL_ERROR, "Already seen ciphering command. Protocol Error.\n"); + reject_cause = GSM0808_CAUSE_PROTOCOL_ERROR_BETWEEN_BSS_AND_MSC; goto reject; } @@ -452,6 +453,7 @@ tlv_parse(, gsm0808_att_tlvdef(), msg->l4h + 1, payload_length - 1, 0, 0); if (!TLVP_PRESENT(, GSM0808_IE_ENCRYPTION_INFORMATION)) { LOGP(DMSC, LOGL_ERROR, "IE Encryption Information missing.\n"); + reject_cause = GSM0808_CAUSE_INFORMATION_ELEMENT_OR_FIELD_MISSING; goto reject; } @@ -464,6 +466,7 @@ len = TLVP_LEN(, GSM0808_IE_ENCRYPTION_INFORMATION); if (len < 1) { LOGP(DMSC, LOGL_ERROR, "IE Encryption Information is too short.\n"); + reject_cause = GSM0808_CAUSE_INCORRECT_VALUE; goto reject; } -- To view, visit https://gerrit.osmocom.org/11438 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: Ia608fa34a6a2d3035a66d05fbc38553ac5186804 Gerrit-Change-Number: 11438 Gerrit-PatchSet: 1 Gerrit-Owner: osmith