Commit Graph

12 Commits

Author SHA1 Message Date
Pau Espin 4ddaee9362 asp: Make ASP default LM timers VTY configurable
Related: SYS#6511
Change-Id: Ib62e19f2e528e8b2792cbb51a5900dc3463ebd06
2023-07-11 14:56:26 +02:00
Pau Espin 7afbc23c2d xua_default_lm_fsm.c: Log rx ASP_UP timeout with NOTICE level
Some user run into this scenario recently and it was difficult to find
out why the SCTP links were being restarted. Add a new log line with
NOTICE level explicitly stating the reason to restart the ASP.

Related: SYS#6511
Change-Id: I5a388d2d96bcf1cbb76981c476abf37dbe213df0
2023-07-09 07:18:31 +00:00
Pau Espin d9e54d7a34 xua_default_lm_fsm.c: Fix typo in comment
Change-Id: I4095878fb05c3128be556ab36dfc7ab88d309c9a
2022-01-21 10:57:03 +01:00
Harald Welte e9b21ff256 osmo_ss7: introduce notion of configurable 'quirks'
A quirk is an implementation work-around in order to establish
interoperability with another implementation, either a buggy one or
one that follows a different interpretation of a given spec.

For now, we introduce a first quirk affecting when we (in ASP role)
send an ASP-ACTIVE message to the SG.

Closes: OS#5145
Change-Id: Idd947ea39d743eb1bc9342ad9d098036821da45b
2021-05-13 18:11:51 +02:00
Pau Espin b775d634f3 ss7: Set configured AS traffic mode when sending Routing Key Register msg
Otherwise default OSMO_SS7_AS_TMOD_OVERRIDE=0 value is always set
regardless of the VTY config "traffic-mode" under AS node.

Related: OS#4220
Change-Id: I5d24772f07e77cc3ba6edfa819bb9bc0266a1064
2019-10-24 13:23:09 +02:00
Pau Espin b2ab192327 cosmetic: ss7: Fix trailing whitespace
Change-Id: Ifd947c51067842b83ea43ce25ba0d652baff259b
2019-10-22 19:38:53 +00:00
Stefan Sperling 3b8ff68a0a free msgb for primitive allocated in lm_timer_cb() of lm_fsm
A primitive allocated in lm_timer_cb() with xua_xlm_prim_alloc()
was never freed. Don't forget to free the msgb in osmo_xlm_sap_down().

Found by code inspection.

Also, assert that allocation suceeded like we do elsewhere.

Change-Id: Ie667b1b8beeda2aa4520a1413f51101435215cc0
Related: OS#2449
2018-05-15 13:47:02 +02:00
Harald Welte b393b3f4cc Add SPDX-License-Identifier + missing copyright statements
Change-Id: I113232bbeaa7a835871df7f9b883ba573d8a2534
2017-11-13 01:25:47 +09:00
Harald Welte 485a1be9d8 Fix SCCP client crash on xUA server (STP) disconnect
When the server (STP) disappears from a live SCCP client,
then the xUA default layer manager receives LM_E_SCTP_DISC_IND,
which is traversing retart_asp().  In there, we first terminate
the current instance of the layer manager FSM, and then re-initialize
the ASP to use the default layer manager using
osmo_ss7_asp_use_default_lm().

However, osmo_ss7_asp_use_default_lm() uses the presence of an
asp->lm_priv pointer as a sign that the old layer manager is still
running and attempts to terminate it - despite being terminated
just before in restart_as().

So let's simply remove the termination from restart_asp(), and
leave it to osmo_ss7_asp_use_default_lm().

Fixes: OS#2402
Change-Id: I062d3af17539de864b56d079fe9b8d76ad99cf1e
2017-08-15 23:30:10 +02:00
Philipp Maier dcb360a9db xua: fix possible memory leak in seems osmo_ss7_asp_use_default_lm()
The function seems osmo_ss7_asp_use_default_lm() does not guard
against an asp->lm_priv FSM instance already existing. If this
function is called a second time, it will overwrite asp->lm_priv,
causing the original fsm instance to leaked.

Check if asp->lm_priv already exists and terminate (free) the
FSM if present.

Change-Id: I4ad435c042a435c4e641c6e5c53b91265dd23d40
2017-07-22 09:08:13 +00:00
Harald Welte 68e9aaa32d xua_default_lm_fsm: Missing printf() argument
Change-Id: I03c30a0d1e03ff56df80bdd1e8a7846142b6f79c
Fixes: coverity CID#166993
2017-04-27 10:27:35 +02:00
Harald Welte ed15c74a01 Add a default layer manager using RKM to register PC with SG
This "default layer manager" can optionally be used by a xUA ASP. It
will handle the xUA Layer Manager (xlm) primitives and use them to
behave as follows:

* bring the ASP into state "INACTIVE"
* see if the SG can match our connection (based on IP address + port
  information) to a statically configured ASP configuration with
  associated AS(s).  If yes, it will send us a NOTIFY message with
  AS-INACTIVE.
* if the above doesn't work, try to dynamically register a routing key
  using RKM for the point code that was locally confiured on the
  ASP/client.   If that works, the SG will now have created ASP and AS
  objects as well as a routing key and be able to serve us, sending the
  NOTIFY with the AS-INACTIVE state.
* After either of the two above, we will attempt to transition into
  ASP-ACTIVE.  The SG should send us an AS-ACTIVE notification in return
* if anything fails, abort and disconnect the SCTP connection, restart
  related FSMs and start from scratch

Change-Id: I78d4623dd213b5c59007a026a6cc3cfe5c04af50
2017-04-13 18:05:13 +02:00