aboutsummaryrefslogtreecommitdiffstats
path: root/src/xua_as_fsm.c
AgeCommit message (Collapse)AuthorFilesLines
2023-09-01m3ua: Add some TODO comments on where we fall short of our potentialHarald Welte1-0/+2
Change-Id: I75d7b8f3fb6a06f6941b6dff4072287fdbb1d33e
2023-06-13cosmetic: fix various typos in comments, log messages and VTY stringsHarald Welte1-1/+1
Change-Id: I9a8afc07ae278100ffe34407db0e196f0c9ce8af
2021-04-29xua_as_fsm: Only delete a route for an IPA AS if we created one earlierHarald Welte1-1/+11
The current code would potentially delete a route that was statically present in the configuration in the following situation: * route exists in config * identical route is attempted to be added at AS-ACTIVE time, but fails * route is unconditionally deleted at AS-DOWN time * user now does 'write file' and has lost a route Let's make sure we only delete the route if we added it previously. Change-Id: I9ad5f7ebe0790e6c186b8ea1b12f204860a00cd2 Related: SYS#5422
2021-04-26ipa: Move automatic route add/del from ASP to AS levelHarald Welte1-0/+64
SS7 routes operate on AS level, not ASP level. However, the automatic SS7 route creation/destruction for IPA was implemented at the ASP level. This works for single-connection ASs, but obviously fails in load-share situations: We attempt to add the same route several times, and we delete it at the first ASP disconnect, even while other ASPs still exist. This patch moves the IPA route creation/deletion from the ASP level to the AS level. When the AS becomes active, the route is added; when it goes to DOWN state, it is removed. Change-Id: Idb602beae3e9bc19f7bd96355c02ec8dfd9c5d6c
2021-02-08xua: Implement SNM availability/unavailability messagingHarald Welte1-0/+31
M3UA and SUA have one sub-protocol called [S]SNM, through which the SG informs the ASP about certain destinations (point codes) becoming available (DAVA) or unavailable (DUNA) in the SS7 network. This patch adds support for * generating DAVA/DUAN on a SGP when the AS FSM changes to/from AS-ACTIVE * receiving DAVA/DUNA on an ASP and informing other "SG role" AS/ASP * processing DAUD from ASP received by SG, generating relate DAVA/DUNA responses Related: OS#2623 Change-Id: Id92be4691b0fd77598a6edb642c028bbd8c5b623
2019-11-20xua: Implement traffic mode broadcastPau Espin Pedrol1-3/+21
Change-Id: I4358965f0ff0aa05c5082a2745159da766e9a4e7
2019-11-14osmo_ss7_vty.c: implement 'active' filter for show_cs7_as_cmdVadim Yanitskiy1-7/+0
Change-Id: I356d90642a500be6a70f60c8240ce1211fd0d934
2019-11-08xua: Don't send NOTIFY messages to IPA ASPsPau Espin Pedrol1-2/+4
Change-Id: Ice3d948e4d2f57a8f52cfb93792d5f4d23284b96
2019-11-06xua: On new ASPAC, set and notify other ASPs as inactivePau Espin Pedrol1-1/+35
RFC4666 sec 4.3.4.3. ASP Active Procedures: """ In the case of an Override mode AS, receipt of an ASP Active message at an SGP causes the (re)direction of all traffic for the AS to the ASP that sent the ASP Active message. Any previously active ASP in the AS is now considered to be in the state ASP-INACTIVE and SHOULD no longer receive traffic from the SGP within the AS. The SGP or IPSP then MUST send a Notify message ("Alternate ASP_Active") to the previously active ASP in the AS and SHOULD stop traffic to/from that ASP. The ASP receiving this Notify MUST consider itself now in the ASP-INACTIVE state, if it is not already aware of this via inter-ASP communication with the Overriding ASP. """ Change-Id: I474f5cc1f6cbab72d010d1f8ac7ed2285e4c1c45
2019-11-06xua: Select only active ASPs during tx in Override traffic modePau Espin Pedrol1-3/+1
Change-Id: I7eb049011b81c5141fd3edf6f0ae0202ffb2c6c9
2019-11-06xua: Reset AS traffic mode set by peer during shutdownPau Espin Pedrol1-0/+12
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
2019-11-06xua: loadshare: select ASP for tx only if activePau Espin Pedrol1-1/+1
Change-Id: I4f1d1aa9395698e5b6b930a5092a4b914dd15fb3
2019-11-06xua: Fix private function namePau Espin Pedrol1-2/+2
The function clearly does stuff the other way as its name used to describe. Change-Id: Ib65a0f2706e2eefe2446d3c9a6bdd19cf9cb81f2
2019-11-05vty: Permit configuration of ASPs in SCTP client modeHarald Welte1-0/+4
The M3UA specification states that either of the two roles should be the SCTP client and the other the server. It also states that the default for the SGP is to operate as server. However, it permits other configurations. Let's allow this to be configured by the VTY. We need to ensure that while in ASP role, we don't send any NOTIFY messages to the peer SG. Change-Id: I7452a862d45da35dcd58654ca17222eb52d26f1f Closes: OS#2005
2019-10-24ss7: Implement AS traffic mode loadshare using round robin ASP selectionPau Espin Pedrol1-4/+44
Related: OS#4220 Change-Id: I98144dde237672df2e78c7c92923e6f4cb77a271
2019-10-22cosmetic: ss7: Fix trailing whitespacePau Espin Pedrol1-1/+1
Change-Id: Ifd947c51067842b83ea43ce25ba0d652baff259b
2017-11-20xua_as[p]_fsm: Use osmo_timer_del() on FSM cleanupHarald Welte1-0/+8
When we destroy a FSM, we (logically) must osmo_timer_del() any running timers that the FSM might have been using. This was not implemented for xua_as_fsm, xua_asp_fsm and also missing from ipa_asp_fsm. Change-Id: I670df831d7bc30de48ed4277648a461e1e1968fa Related: OS#2668
2017-11-13Add SPDX-License-Identifier + missing copyright statementsHarald Welte1-0/+2
Change-Id: I113232bbeaa7a835871df7f9b883ba573d8a2534
2017-04-18Add IPA/SCCPlite support as SIGTRAN alternativeHarald Welte1-1/+5
This tries as good as possible to fit the IPA/SCCPlite stacking into the existing SIGTRAN/SS7 code architecture/model. To the user, the IPA protocol looks like yet another protocol on the same level as the choice between SUA and M3AU. On the inside, things are obviously quite different. We need to handle TCP with IPA framing instead of SCTP for both server and client. We also implement an alternative "ASP FSM" for IPA, which takes care of the CCM handshake (ID_REQ/ID_RESP/ID_ACK/ID_ACK2) for both client and server mode. In server mode, we use the 'unit name' as identifier to look up the AS, similar to how we use a routing context to look up the AS in the xUA case. We also have to bypass activating the default layer manager in the simple client to make sure we don't run into even more complexity. What's missing right now is some way to manually override/set the point codes. As IPA/SCCPlite is missing any routing label, we currently simply generate one with SPC=0/DPC=0, which will obviously not work in most configurations. Change-Id: I9098574cddeba10fcf8f1b6c196a7069a6805c56
2017-04-17xua_as_fsm: We might change to AS_INACTIVE after T(r) expiryHarald Welte1-1/+4
Depending on whether or not any ASP is INACTIVE, we need to go to AS_INACTIVE or AS_DOWN after T(r) expiry in the xua_as_fsm. Found by m3ua-testtool testcase m3ua-sgp-aspsm-o-003 Change-Id: Iad6b176a5c95a28fbd5ba437696c2e6e160bdb00
2017-04-14SUA/M3UA: Implement T(r) recovery timer of Application Server FSMHarald Welte1-4/+75
When an AS goes "down" it first entres a recovery state, in which any to-be-transmitted messages are enqueued until the timer T(r) expires. Once the timer expires, the messages are discarded. If the AS goes ACTIVE before timer expiration, queued messages are sent. Change-Id: I22725bf35306299a00c66d7b3637f5e198c26247
2017-04-10xua: move notfiy parameters from xua_internal to sigtran_sap and rename themHarald Welte1-3/+3
Change-Id: I295b9d6755a4bb52a817d2791a302bdd9fc775dd
2017-04-10xua_as_fsm: Include routing context (if configured) in NTFY messageHarald Welte1-0/+9
Change-Id: I15e8bf5cee194f9924d0eab9cff0e7c25daa6dde
2017-04-10Add new 'osmo_ss7' SS7 core code with M3UA, ASP/AS FSM, ...Harald Welte1-0/+308
This is what aims to be a rather complete/proper implementation of the SIGTRAN + SS7 protocol suite. It has proper abstraction between the layers with primitives, finite state machines for things like the AS and ASP state machines, support for point code routing, etc. What's not implemented at this point: * re-integration of pre-existing SUA (pending) * actual MTP2 and physical E1/T1 link support * different trafic modes like broadcast/fail-over/load-balance Change-Id: I375eb80f01acc013094851d91d1d3333ebc12bc7