diff options
author | Pau Espin Pedrol <pespin@sysmocom.de> | 2023-12-12 17:31:38 +0100 |
---|---|---|
committer | Pau Espin Pedrol <pespin@sysmocom.de> | 2023-12-12 19:18:27 +0100 |
commit | 57444690212b1576eaf0a7156448ba2d27c59050 (patch) | |
tree | 667d6f99e426230c29787c2f8b675cec8cd80dd4 /src/xua_asp_fsm.h | |
parent | 59bab0187cab7fce52eb2a9fe484c598243a349e (diff) |
ipa: Use ASP name as ipa_unit_name on dynamic ASPs
A recent patch fixed a long problem where the ASP name (instead of
expected AS name) was used as ipa_unit_name in IPA based ASPs.
For server side it doesn't matter much, sense anyway the ipa_unit_name
is actually restored on the struct with what's received in IPA GET_RESP
message (see ipa_asp_fsm_wait_id_resp()). So the fix was actually for
the client side in the scenario where a non-dynamic ASP with an assigned
AS was configured in the VTY.
However, dynamic ASPs usually have no assigned AS (because in general it
is really not created/configured, as the ASP is created on the flight).
As a result, the recent patch (see "Fixes" below), broke dynamic ASPs
case because from then one ipa_asp_fsm_start() would fail and terminate
the FSM because ipa_find_as_for_asp() was returning NULL.
So improve the recent patch by applying the previous logic for dynamic
ASPs:
* On the server side, it really doesn't matter since as mentioned, the
field will be repopulated later on, but allows the code to avoid
terminating the FSM and hence be brought up and be ready to receive
clients.
* On the client case, this is how dynamic IPA ASPs were ment to be used
when they were introduced anyway (use ASP as ipa_unit_id, meaning
"AS name" == "ASP name").
Furthermore, on the client side, the non-dynamic IPA ASPs need their
bring up be delayed until assigned to an AS, because the AS name is sent
in ipa_unit_name field in Tx IPA ID RESP.
This usually happens at a later point than ASP (FSM) creation, because
first the ASP object is created (through VTY or API) and then assigned
to an AS through osmo_ss7_as_add_asp() usually from a later "asp" vty
command in the "as" node.
Fixes: 65741dca056e3a16973ad156dd4c09760a6a945b
Change-Id: I0a741449450c998253b1e44a76a3b7fc224e0903
Related: SYS#5914
Diffstat (limited to 'src/xua_asp_fsm.h')
-rw-r--r-- | src/xua_asp_fsm.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/xua_asp_fsm.h b/src/xua_asp_fsm.h index 2b36220..ca44514 100644 --- a/src/xua_asp_fsm.h +++ b/src/xua_asp_fsm.h @@ -28,6 +28,9 @@ enum xua_asp_event { XUA_ASP_E_ASPSM_BEAT, XUA_ASP_E_ASPSM_BEAT_ACK, + /* The ASP was added to an AS. data: (struct osmo_ss7_as *) */ + XUA_ASP_E_AS_ASSIGNED, + /* IPA specific */ IPA_ASP_E_ID_RESP, IPA_ASP_E_ID_ACK, |