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


Change subject: xua: Allow rx DAUD in IPSP with quirk daud_in_asp
......................................................................

xua: Allow rx DAUD in IPSP with quirk daud_in_asp

That quirk was added back in time most probably when interacting with
some peer who claimed to be in SG mode but actually was in IPSP mode.
Hence, to be on the safe side, be relaxed and allow accepting DAUD also
if the quirk is added, otherwise it may be impossible to continue
communication with that faulty peer.
In theory according to spec DAUD should only be sent ASP->SG.

Change-Id: I8ad0889f4584446f8b01f1255498f57e0cd34012
---
M src/m3ua.c
M src/sua.c
2 files changed, 26 insertions(+), 2 deletions(-)



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

diff --git a/src/m3ua.c b/src/m3ua.c
index abf951f..a2da98e 100644
--- a/src/m3ua.c
+++ b/src/m3ua.c
@@ -1127,9 +1127,21 @@
                        return rc;
                xua_snm_rx_scon(asp, as, xua);
                break;
+       case M3UA_SNM_DAUD:
+               /* RFC states only permitted in ASP->SG direction, not reverse 
nor IPSP. But some
+                * equipment still sends it to us as IPSP ?!? */
+               if (asp->cfg.quirks & OSMO_SS7_ASP_QUIRK_DAUD_IN_ASP) {
+                       LOGPASP(asp, DLM3UA, LOGL_NOTICE, "quirk daud_in_asp 
active: Accepting DAUD "
+                               "despite being in IPSP role\n");
+                       xua_snm_rx_daud(asp, xua);
+               } else {
+                       LOGPASP(asp, DLM3UA, LOGL_ERROR, "DAUD not permitted in 
IPSP role\n");
+                       rc = M3UA_ERR_UNSUPP_MSG_TYPE;
+               }
+               break;
        default:
                /* RFC 4666 Section 1.5.2: there is no MTP3 network management 
status information */
-               return M3UA_ERR_UNSUPP_MSG_TYPE;
+               rc = M3UA_ERR_UNSUPP_MSG_TYPE;
        }
 
        return rc;
diff --git a/src/sua.c b/src/sua.c
index 2eb93e3..f836a9a 100644
--- a/src/sua.c
+++ b/src/sua.c
@@ -1085,8 +1085,20 @@
                        return rc;
                xua_snm_rx_scon(asp, as, xua);
                break;
+       case SUA_SNM_DAUD:
+               /* RFC states only permitted in ASP->SG direction, not reverse 
nor IPSP. But some
+                * equipment still sends it to us as IPSP ?!? */
+               if (asp->cfg.quirks & OSMO_SS7_ASP_QUIRK_DAUD_IN_ASP) {
+                       LOGPASP(asp, DLSUA, LOGL_NOTICE, "quirk daud_in_asp 
active: Accepting DAUD "
+                               "despite being in IPSP role\n");
+                       xua_snm_rx_daud(asp, xua);
+               } else {
+                       LOGPASP(asp, DLSUA, LOGL_ERROR, "DAUD not permitted in 
IPSP role\n");
+                       rc = SUA_ERR_UNSUPP_MSG_TYPE;
+               }
+               break;
        default:
-               return M3UA_ERR_UNSUPP_MSG_TYPE;
+               rc = M3UA_ERR_UNSUPP_MSG_TYPE;
        }

        return rc;

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

Reply via email to