Change in libosmo-sccp[master]: xua: Reset AS traffic mode set by peer during shutdown

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/.

pespin gerrit-no-reply at lists.osmocom.org
Wed Nov 6 15:25:02 UTC 2019


pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmo-sccp/+/15991 )


Change subject: xua: Reset AS traffic mode set by peer during shutdown
......................................................................

xua: Reset AS traffic mode set by peer during shutdown

This way the AS can be configured to use different traffic modes over
time as long as they don't overlap in time. That is in this case where
no specific traffic mode is specified in AS local configuration (VTY).

Some RFC4666 state similar behvor of deleting data set by ASPs during AS
shutdown. For instance:
"""
   Other ASPs may continue to be associated with the Application Server,
   in which case the Routing Key data SHOULD NOT be deleted.  If a
   Deregistration results in no more ASPs in an Application Server, an
   SG MAY delete the Routing Key data.
"""

This allows for tests to easily re-use same AS to test different traffic
modes as long as they wait for the recovery timeout (2 secs by default,
configurable via VTY).
Related: OS#4220
Change-Id: I370aa3b5ddfc456c1be5b2585f2f470d5aa8d289
---
M src/xua_as_fsm.c
1 file changed, 12 insertions(+), 0 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/libosmo-sccp refs/changes/91/15991/1

diff --git a/src/xua_as_fsm.c b/src/xua_as_fsm.c
index b0fbd2a..04e592c 100644
--- a/src/xua_as_fsm.c
+++ b/src/xua_as_fsm.c
@@ -252,6 +252,17 @@
 	case XUA_AS_S_PENDING:
 		npar.status_info = M3UA_NOTIFY_I_AS_PEND;
 		break;
+	case XUA_AS_S_DOWN:
+		/* RFC4666 sec 4.3.2 AS States:
+		   If we end up here, it means no ASP is ACTIVE or INACTIVE,
+		   meaning no ASP can have already configured the traffic mode
+		   in ASPAC or REG REQ. Hence, we can clear traffic mode defined
+		   by peers and allow next first peer to request a new traffic
+		   mode. */
+		as->cfg.mode_set_by_peer = false;
+		if (!as->cfg.mode_set_by_vty)
+			as->cfg.mode = OSMO_SS7_AS_TMOD_OVERRIDE;
+		return;
 	default:
 		return;
 	}
@@ -374,6 +385,7 @@
 				  S(XUA_AS_S_INACTIVE),
 		.name = "AS_DOWN",
 		.action = xua_as_fsm_down,
+		.onenter = xua_as_fsm_onenter,
 	},
 	[XUA_AS_S_INACTIVE] = {
 		.in_event_mask = S(XUA_ASPAS_ASP_DOWN_IND) |

-- 
To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/15991
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: libosmo-sccp
Gerrit-Branch: master
Gerrit-Change-Id: I370aa3b5ddfc456c1be5b2585f2f470d5aa8d289
Gerrit-Change-Number: 15991
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin at sysmocom.de>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20191106/dc06ac81/attachment.htm>


More information about the gerrit-log mailing list