This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
laforge gerrit-no-reply at lists.osmocom.orglaforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmo-sccp/+/24216 ) Change subject: m3ua/sua: Add new snm_inactive quirk ...................................................................... m3ua/sua: Add new snm_inactive quirk This quirk allows the M3UA + SUA code to accept SSNM/SNM traffic despite being in AS-INACTIVE state. This is forbidden by the RFCs but there are some implementations that apparently just don't care what is specified. Change-Id: I193dd546b3e3c00e29f192d0d1bf7819b3e194be Closes: OS#5148 --- M include/osmocom/sigtran/osmo_ss7.h M src/m3ua.c M src/osmo_ss7_vty.c M src/sua.c 4 files changed, 10 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-sccp refs/changes/16/24216/1 diff --git a/include/osmocom/sigtran/osmo_ss7.h b/include/osmocom/sigtran/osmo_ss7.h index a799b04..3d13b6a 100644 --- a/include/osmocom/sigtran/osmo_ss7.h +++ b/include/osmocom/sigtran/osmo_ss7.h @@ -432,9 +432,11 @@ }; /*! Peer SG doesn't send NTFY(AS-INACTIVE) after ASP-UP procedure */ -#define OSMO_SS7_ASP_QUIRK_NO_NOTIFY 0x00000001 +#define OSMO_SS7_ASP_QUIRK_NO_NOTIFY 0x00000001 /*! Accept DAUD in ASP role (RFC states only permitted in ASP->SG role) */ -#define OSMO_SS7_ASP_QUIRK_DAUD_IN_ASP 0x00000002 +#define OSMO_SS7_ASP_QUIRK_DAUD_IN_ASP 0x00000002 +/*! Accept SSNM even if ASP is in AS-INACTIVE state */ +#define OSMO_SS7_ASP_QUIRK_SNM_INACTIVE 0x00000004 int osmo_ss7_asp_peer_snprintf(char* buf, size_t buf_len, struct osmo_ss7_asp_peer *peer); int osmo_ss7_asp_peer_set_hosts(struct osmo_ss7_asp_peer *peer, void *talloc_ctx, diff --git a/src/m3ua.c b/src/m3ua.c index 283b3f8..f653d5b 100644 --- a/src/m3ua.c +++ b/src/m3ua.c @@ -933,7 +933,8 @@ static int m3ua_rx_snm(struct osmo_ss7_asp *asp, struct xua_msg *xua) { /* SNM only permitted in ACTIVE state */ - if (asp->fi->state != XUA_ASP_S_ACTIVE) { + if (asp->fi->state != XUA_ASP_S_ACTIVE && + !(asp->fi->state == XUA_ASP_S_INACTIVE && asp->cfg.quirks & OSMO_SS7_ASP_QUIRK_SNM_INACTIVE)) { LOGPASP(asp, DLM3UA, LOGL_NOTICE, "Received M3UA SNM while ASP in state %s\n", osmo_fsm_inst_state_name(asp->fi)); return M3UA_ERR_UNEXPECTED_MSG; diff --git a/src/osmo_ss7_vty.c b/src/osmo_ss7_vty.c index b2e3192..dcbe9b2 100644 --- a/src/osmo_ss7_vty.c +++ b/src/osmo_ss7_vty.c @@ -58,12 +58,14 @@ static const struct value_string asp_quirk_names[] = { { OSMO_SS7_ASP_QUIRK_NO_NOTIFY, "no_notify" }, { OSMO_SS7_ASP_QUIRK_DAUD_IN_ASP, "daud_in_asp" }, + { OSMO_SS7_ASP_QUIRK_SNM_INACTIVE, "snm_inactive" }, { 0, NULL } }; static const struct value_string asp_quirk_descs[] = { { OSMO_SS7_ASP_QUIRK_NO_NOTIFY, "Peer SG doesn't send NTFY(AS-INACTIVE) after ASP-UP" }, { OSMO_SS7_ASP_QUIRK_DAUD_IN_ASP, "Allow Rx of DAUD in ASP role" }, + { OSMO_SS7_ASP_QUIRK_SNM_INACTIVE, "Allow Rx of [S]SNM in AS-INACTIVE state" }, { 0, NULL } }; diff --git a/src/sua.c b/src/sua.c index 4e9a2cb..27b75db 100644 --- a/src/sua.c +++ b/src/sua.c @@ -944,7 +944,8 @@ static int sua_rx_snm(struct osmo_ss7_asp *asp, struct xua_msg *xua) { /* SNM only permitted in ACTIVE state */ - if (asp->fi->state != XUA_ASP_S_ACTIVE) { + if (asp->fi->state != XUA_ASP_S_ACTIVE && + !(asp->fi->state == XUA_ASP_S_INACTIVE && asp->cfg.quirks & OSMO_SS7_ASP_QUIRK_SNM_INACTIVE)) { LOGPASP(asp, DLSUA, LOGL_NOTICE, "Received M3UA SNM while ASP in state %s\n", osmo_fsm_inst_state_name(asp->fi)); return SUA_ERR_UNEXPECTED_MSG; -- To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/24216 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Change-Id: I193dd546b3e3c00e29f192d0d1bf7819b3e194be Gerrit-Change-Number: 24216 Gerrit-PatchSet: 1 Gerrit-Owner: laforge <laforge at osmocom.org> Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210511/d26abe77/attachment.htm>