osmo-hnbgw/src
Neels Hofmeyr c17b2850b7 rua: validate correct RUA ctx state per RUA message type
It helps in a pretty complex situation seen in the field.
A third-party MSC releases SCCP in one fell swoop, not waiting for the
Iu Release Complete to come back from RAN as the specs would suggest.

The result is this odd sequence, where late rx of RUA Disconnect
actually causes a new SCCP connection to be established and torn down
again:

    RAN                 HNBGW                MSC
     |--active-RUA-ctx----|--active-sccp------|
     |                    |<--IU-Release-Cmd--|
     |<--IU-Release-Cmd---|                   |
     |                    |<--SCCP-RLSD-------| (too soon)
     |...<-RUA-Disconnect-|                   x (the consequence)
     |                    x
     |--RUA-Disconnect--->|                     (IU Release Complete)
     x              <create-new-ctx>
                          |-SCCP-CR---------->|
                          |-IU-Release-Compl->|
                          |<--CREF------------|
                          x                   x

This patch is a relatively simple practical improvement of above
situation that is logically obvious:

Validate the correct message type for creating a new RUA-to-SCCP
context: RUA Connect.

That means the IU Release Complete is ignored:

    RAN                 HNBGW                MSC
     |--active-RUA-ctx----|--active-sccp------|
     |                    |<--IU-Release-Cmd--|
     |<--IU-Release-Cmd---|                   |
     |                    |<--SCCP-RLSD-------| (too soon)
     |...<-RUA-Disconnect-|                   x (the consequence)
     |                    x
     |--RUA-Disconnect--->|                     (IU Release Complete)
     x                 <error>
                          x

Related: SYS#6602
Change-Id: Ie359fcada98fb19f56015cf462e6d8c039f5fce5
2023-12-12 02:02:08 +01:00
..
osmo-hnbgw rua: validate correct RUA ctx state per RUA message type 2023-12-12 02:02:08 +01:00
Makefile.am Initial structure + import code from osmo-iuh.git 2022-01-04 19:48:52 +01:00