pespin has submitted this change. ( 
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(-)

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




diff --git a/src/m3ua.c b/src/m3ua.c
index cad7889..42a9798 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: merged
Gerrit-Project: libosmo-sigtran
Gerrit-Branch: master
Gerrit-Change-Id: Iad7280619ec5814cda7a179418079048a5955976
Gerrit-Change-Number: 42025
Gerrit-PatchSet: 2
Gerrit-Owner: pespin <[email protected]>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <[email protected]>
Gerrit-Reviewer: osmith <[email protected]>
Gerrit-Reviewer: pespin <[email protected]>

Reply via email to