pespin has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-sgsn/+/43804?usp=email )

Change subject: sigtran: N-DISCONNECT.req: Use proper SCCP-User release reason
......................................................................

sigtran: N-DISCONNECT.req: Use proper SCCP-User release reason

Until recently, libosmo-sigtran was incorrectly expecting low-level
wire-format cause in N-DISCONNECT.req. Nowadays it supports specific
reason values in the SCCP-User SAP, so use those instead.

Change-Id: I4bf44c973ae5dbe6fc2164e1ecc314b1cfdaf08c
Related: OS#2601
---
M TODO-RELEASE
M src/sgsn/iu_client.c
M src/sgsn/iu_rnc.c
M src/sgsn/iu_rnc_fsm.c
4 files changed, 8 insertions(+), 4 deletions(-)

Approvals:
  Jenkins Builder: Verified
  lynxis lazus: Looks good to me, approved
  osmith: Looks good to me, but someone else must approve




diff --git a/TODO-RELEASE b/TODO-RELEASE
index fa97ecb..40cc353 100644
--- a/TODO-RELEASE
+++ b/TODO-RELEASE
@@ -13,3 +13,4 @@
 libosmo-gsup-client >1.8.0  osmo_gsup_client_is_connected(), 
osmo_gsup_client_get_rem_addr(), osmo_gsup_client_get_rem_port()
 osmo-iuh >1.7.0 ranap multiple params are constified, see osmo-iuh Change-Id 
I667dc2ef377c1ceb5b11315458f00b282c143c81
 osmo-iuh >1.8.1 ranap_new_msg_rab_assign_data2() / 
ranap_new_msg_rab_assign_voice2()
+libosmo-sigtran >2.3.0 OSMO_SCCP_REL_REASON_NSU_*
diff --git a/src/sgsn/iu_client.c b/src/sgsn/iu_client.c
index 164ff71..18a4e1f 100644
--- a/src/sgsn/iu_client.c
+++ b/src/sgsn/iu_client.c
@@ -34,7 +34,6 @@
 #include <osmocom/gprs/gprs_msgb.h>
 #include <osmocom/sigtran/sccp_sap.h>
 #include <osmocom/sigtran/sccp_helpers.h>
-#include <osmocom/sccp/sccp_types.h>

 #include <osmocom/sgsn/debug.h>
 #include <osmocom/sgsn/gprs_ranap.h>
@@ -94,7 +93,10 @@
                return;

        osmo_timer_del(&ue_ctx->release_timeout);
-       osmo_sccp_tx_disconn(ue_ctx->rnc->scu_iups->scu, ue_ctx->conn_id, NULL, 
0);
+       osmo_sccp_tx_disconn(ue_ctx->rnc->scu_iups->scu,
+                            ue_ctx->conn_id,
+                            NULL,
+                            OSMO_SCCP_REL_REASON_NSU_DISC_NORMAL);
        llist_del(&ue_ctx->list);
        talloc_free(ue_ctx);
 }
diff --git a/src/sgsn/iu_rnc.c b/src/sgsn/iu_rnc.c
index 1a15df1..32dfe62 100644
--- a/src/sgsn/iu_rnc.c
+++ b/src/sgsn/iu_rnc.c
@@ -34,7 +34,6 @@
 #include <osmocom/gprs/gprs_msgb.h>
 #include <osmocom/sigtran/sccp_sap.h>
 #include <osmocom/sigtran/sccp_helpers.h>
-#include <osmocom/sccp/sccp_types.h>

 #include <osmocom/sgsn/debug.h>
 #include <osmocom/sgsn/gprs_ranap.h>
diff --git a/src/sgsn/iu_rnc_fsm.c b/src/sgsn/iu_rnc_fsm.c
index 3e506a3..bfed0c9 100644
--- a/src/sgsn/iu_rnc_fsm.c
+++ b/src/sgsn/iu_rnc_fsm.c
@@ -182,7 +182,9 @@
                LOG_RNC(rnc, LOGL_ERROR, "Receiving CO Initial message on RAN 
peer that has not done a proper RESET yet."
                             " Disconnecting on incoming message, sending RESET 
to RAN peer.\n");
                
osmo_sccp_tx_disconn(ev_msg_up_co_initial_ctx->rnc->scu_iups->scu,
-                                    ev_msg_up_co_initial_ctx->conn_id, NULL, 
0);
+                                    ev_msg_up_co_initial_ctx->conn_id,
+                                    NULL,
+                                    
OSMO_SCCP_REL_REASON_NSU_DISC_END_USER_FAILURE);
                /* No valid RESET procedure has happened here yet. */
                iu_rnc_reset(rnc);
                return;

--
To view, visit https://gerrit.osmocom.org/c/osmo-sgsn/+/43804?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings?usp=email

Gerrit-MessageType: merged
Gerrit-Project: osmo-sgsn
Gerrit-Branch: master
Gerrit-Change-Id: I4bf44c973ae5dbe6fc2164e1ecc314b1cfdaf08c
Gerrit-Change-Number: 43804
Gerrit-PatchSet: 4
Gerrit-Owner: pespin <[email protected]>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: lynxis lazus <[email protected]>
Gerrit-Reviewer: osmith <[email protected]>
Gerrit-Reviewer: pespin <[email protected]>

Reply via email to