pespin has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/libosmo-sigtran/+/42092?usp=email )


Change subject: sua: Support rx SCON in role=SG
......................................................................

sua: Support rx SCON in role=SG

Change-Id: Ide2b4f876ddbdb1bb0bfed11fad6fc13aaf1afda
---
M src/sua.c
1 file changed, 14 insertions(+), 1 deletion(-)



  git pull ssh://gerrit.osmocom.org:29418/libosmo-sigtran 
refs/changes/92/42092/1

diff --git a/src/sua.c b/src/sua.c
index 40b6e2f..ceb5d7a 100644
--- a/src/sua.c
+++ b/src/sua.c
@@ -1044,7 +1044,20 @@
 /* received SNM message on SG side */
 static int sua_rx_snm_sg(struct osmo_ss7_asp *asp, struct xua_msg *xua)
 {
+       struct osmo_ss7_as *as = NULL;
+       struct xua_msg_part *rctx_ie;
+       int rc = 0;
+
        switch (xua->hdr.msg_type) {
+       case M3UA_SNM_SCON:
+               /* RFC3868 1.5.6: "The SUA layer at an ASP or IPSP MAY indicate 
local congestion to
+                * an SUA peer with an SCON message." */
+               rctx_ie = xua_msg_find_tag(xua, SUA_IEI_ROUTE_CTX);
+               rc = xua_find_as_for_asp(&as, asp, rctx_ie);
+               if (rc)
+                       return rc;
+               xua_snm_rx_scon(asp, as, xua);
+               break;
        case SUA_SNM_DAUD:      /* Audit: ASP inquires about availability of 
Point Codes */
                xua_snm_rx_daud(asp, xua);
                break;
@@ -1052,7 +1065,7 @@
                return SUA_ERR_UNSUPP_MSG_TYPE;
        }

-       return 0;
+       return rc;
 }

 static int sua_rx_snm(struct osmo_ss7_asp *asp, struct xua_msg *xua)

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

Gerrit-MessageType: newchange
Gerrit-Project: libosmo-sigtran
Gerrit-Branch: master
Gerrit-Change-Id: Ide2b4f876ddbdb1bb0bfed11fad6fc13aaf1afda
Gerrit-Change-Number: 42092
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <[email protected]>

Reply via email to