* Avoid activating later on if inactive when becoming blocked. * Move to inactive state (and notify peer with ASPIA) if active when becoming blocked. * Attempt re-activation if needed when becoming non-blocked.
Create missing LayerManager fsm in dynamic srv xua asps
Dynamic xUA ASPs in transport_role=server where missing initialization +start of its LayerManager, meaning they had no xua_default_lm_fsm instance attached. Previous the xua_default_lm_fsm didn't do anything internally, but since recently ir properly transitions through states in SG role too, so we want to handle blocking/unblocking, etc.
xua_lm: Add S_INACTIVE state and improve state transitions
The S_INACTIVE state will be needed once we support administrative state block in role ASP/(active)IPSP.
It is also useful now since sometimes we just want to leave an asp in that state without any timer running (eg. asps in override which are not active until the active one goes inactive).
Adding the S_INACTIVE state also allows transitioning states in role SG, since we now have somewhere to go instead of leaving it alwas as S_IDLE.
The S_INACTIVE state also allows staying in that state until the ASP ACT ACK is received, moment at which the ASP is considered ACTIVE according to specs.
Right now it's difficult to grasp what's implemented of the SAP since it was scattered around several places. Put all the SAP forwarding logic into its own file so it's easy to follow and extend (eg. adding new helper functions, etc.)
Previous transition to S_IDLE was wrong, since there's no way to recover from that state unless the SCTP connection is closed. Instead, try harder waiting for some new notifications to try re-activating the ASP and see if the AS becomes active, or end up timing out and reconnecting to re-attempt complete set of steps.
xua_rkm: send_reg_req: Avoid adding Routing Context with value 0
We use routing context 0 internally as "no routing context". Since the Routing Context in the Routing KEy IE in RKM REG REQ is optional, if local rctx is 0 (because we expect to get one allocated by the STP and receive it through RKM REG RESP), avoid sending it with the value 0.