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


Change subject: IPSP: don't route any incoming M3UA messages in IPSP case
......................................................................

IPSP: don't route any incoming M3UA messages in IPSP case

An IPSP is a point-to-point association, and we must not route any
such messages.

Change-Id: Iad7280619ec5814cda7a179418079048a5955976
---
M src/m3ua.c
1 file changed, 8 insertions(+), 1 deletion(-)



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

diff --git a/src/m3ua.c b/src/m3ua.c
index e4173bd..a3235d6 100644
--- a/src/m3ua.c
+++ b/src/m3ua.c
@@ -41,6 +41,7 @@
 #include <osmocom/sigtran/protocol/sua.h>

 #include "mtp3_hmdc.h"
+#include "mtp3_hmdt.h"
 #include "xua_as_fsm.h"
 #include "xua_asp_fsm.h"
 #include "xua_internal.h"
@@ -667,8 +668,14 @@
                xua_msg_free_tag(xua, M3UA_IEI_ROUTE_CTX);
        }

+       /* an IPSP by definition is a peer-to-peer service that doesn't
+        * use a signaling gateway, and hence doesn't route messages.
+        * See RFC 4666 Section 1.4.3.4. */
        /* xua ownership is passed here: */
-       return mtp3_hmdc_rx_from_l2(asp->inst, xua);
+       if (asp->cfg.role == OSMO_SS7_ASP_ROLE_IPSP)
+               return mtp3_hmdt_message_for_distribution(asp->inst, xua);
+       else
+               return mtp3_hmdc_rx_from_l2(asp->inst, xua);

 ret_free:
        xua_msg_free(xua);

--
To view, visit https://gerrit.osmocom.org/c/libosmo-sigtran/+/42025?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: Iad7280619ec5814cda7a179418079048a5955976
Gerrit-Change-Number: 42025
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <[email protected]>
Gerrit-CC: laforge <[email protected]>

Reply via email to