Commit Graph

10 Commits

Author SHA1 Message Date
Oliver Smith dea9921e28 vty: show mscs: add BSSMAP state
New output:
  OsmoBSC> show mscs
  MSC 0: RI=SSN_PC,PC=0.23.3,SSN=BSSAP <-> RI=SSN_PC,PC=0.23.1,SSN=BSSAP
         ASP protocol: m3ua
         BSSMAP state: CONNECTED

Closes: OS#6741
Change-Id: I23ddba7d935e5cc5dae041458207c674ccb9d013
2024-01-16 19:01:54 +01:00
Neels Hofmeyr 8f8af40974 SCCP N-PCSTATE: trigger MSC status on PC availability
Related: SYS#6319
Related: Ia1aea4e33230d6a685b72ea5ba20dd9c7d265d44 osmo-ttcn3-hacks
Related: Ib4a5330df30a73e744c316898817b2fa3271d75e osmo-ttcn3-hacks
Change-Id: I3a0869598b8395601a16d78dbc46eec400c0ea84
2023-04-14 14:32:44 +00:00
Harald Welte 6c8ca97546 Support building with -Werror=strict-prototypes / -Werror=old-style-definition
Unfortunately "-std=c99" is not sufficient to make gcc ignore cold that
uses constructs of earlier C standards, which were abandoned in C99.

See https://lwn.net/ml/fedora-devel/Y1kvF35WozzGBpc8@redhat.com/ for
some related discussion.

Change-Id: Ic92aa70d569778a776f4c5d24c455f71fd50b61b
2022-11-10 00:28:46 +00:00
Max 56dc61e3f5 BSSMAP: add assert to reset resending
There seems to be no way for this function to be called with NULL parameter despite unreproducible crash observed in the
past. Let's add assert to show this explicitly.

Fixes: OS#5551
Change-Id: I235bdd42ea82e7b5a1a40f437ca34c49ad239c48
2022-09-05 13:04:31 +00:00
Philipp Maier 49865023c9 bssmap_reset: make T4 user configurable
The timer (T4) that controls the re-sending of the BSSMAP RESET can not
be changed via the VTY, althrough it is defined via a tdef struct. Lets
add a description along with default values to make it configurable via
the VTY.

Change-Id: I1fb5699220ab8a643a168567a89c6f381fe433a7
Related: SYS#5796
2022-02-08 11:51:42 +01:00
Neels Hofmeyr f8bed50e05 vty: add "msc N bssmap reset" command
Allow resetting the BSSMAP link from VTY, for BSC_Tests.ttcn.

In the field, detecting that an MSC is lost is done by getting three
connection failures in a row. For the BSC_Tests, it is easier to just
provide a VTY command to reset an MSC's link status.

I want to add tests that verify the stat items reflecting the MSC
connection status. To be able to run a test expecting fewer connected
MSC after a test that launched more MSCs requires the links to be reset.

Related: SYS#5542
Related: Ice3056dc46c94f9399f8379db7aeb7193782f2f2 (osmo-ttcn3-hacks)
Change-Id: I1975941b790d2b30d0904d41e456220cba26ecff
2021-08-30 16:18:12 +00:00
Neels Hofmeyr 18abd1a808 Lb: stop RESET FSM when sccp_user is unbound
A crash was reported in bssmap_le_tx_reset() sending a RESET with
sccp_user == NULL. Looking at the issue I noticed that when the
sccp_user is torn down, the RESET FSM should also be terminated.

Add bssmap_reset_term_and_free() to the generic RESET FSM implementation
and call from lb_stop() before sccp_user is set to NULL.

Related: OS#5134
Change-Id: If412ef990fcdde8ff88098a5169e86f05cd1c7f0
2021-04-27 17:34:23 +02:00
Neels Hofmeyr 8cf7d9479e BSSMAP RESET: also accept conn cfm events during ST_DISC
We don't really expect connection attempts during ST_DISC, but if the user
happens to dispatch those events for whatever obscure reasons, treat them
instead of erroring about an unallowed event.

Change-Id: Ic7c60a40ff25ae647ee659259dfea769bc4592e4
2020-10-15 05:28:44 +02:00
Neels Hofmeyr e95b92b63e BSSMAP RESET: move RESET-ACK into reset fsm
The Lb interface will need the same RESET-ACK logic.

Change-Id: Idf4682319a0af5665e867dbc0515d1fe343d9daf
2020-10-15 05:28:44 +02:00
Neels Hofmeyr c27ae2da55 BSSMAP RESET: generalize a_reset FSM
Separate the a_reset FSM implementation from BSSMAP and MSC specifics, so that
it can be re-used on the Lb interface.

Move the FSM implementation to bssmap_reset.c and tweak, to match common practices we
have generally established in our osmo_fsm implementations.

Keep a_reset.h and a_reset.c and redirect to bssmap_reset.c.

A difficulty is setting a proper logging category: the FSM definition allows
only one fixed logging category for FSM state transitions and events. Ideally,
the BSSMAP reset fsm would log on DMSC, and the BSSMAP-LE reset fsm would log
on DLCS. Since that is not possible, introduce a separate DRESET logging
category. This in fact matches an item on my wishlist, because if a given MSC
is configured but currently not connected, the previous RESET FSM would
continuously "spam" log LOGL_NOTICE messages indicating that it is resending
RESET, and I often want to silence those messages without silencing the entire
DMSC category. This is now easily possible by setting DRESET logging to
LOGL_ERROR. There is additional "link up" / "link lost" logging on DMSC, so all
interesting info is still visible on DMSC.

Change-Id: Ib3c3a163186c40a93be0dea666230431172136df
2020-10-15 05:28:24 +02:00