SCCP/M3UA: PC and routing questions

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/OpenBSC@lists.osmocom.org/.

Neels Hofmeyr nhofmeyr at sysmocom.de
Wed Jun 21 03:12:37 UTC 2017


Trying to get the HNBGW to communicate with the MSC. I receive Iuh from the
femto cell as usual, send to the MSC, and end up in an infinite loop where
osmo-stp and osmo-hnbgw send the same message back and forth to each other.

osmo-hnbgw's local IuCS PC is 23, the MSC is PC 1.

It seems when osmo-hnbgw receives a message to PC 23, i.e. to itself, it thinks
that its own PC isn't local, finds its own as-clnt-CS in the table of routes,
and feeds it to m3ua_tx_xua_as(). osmo-stp then sends it back. repeat.

It seems overkill that a "client" like osmo-hnbgw should be capable of routing
in the first place. It could switch off routing entirely and receive & handle
every message it receives itself. But assuming that this were nonsense:

IIUC it should rather decide that its own PC 23 is local, in:

bool osmo_ss7_pc_is_local(struct osmo_ss7_instance *inst, uint32_t pc)
{
        OSMO_ASSERT(ss7_initialized);
        if (pc == inst->cfg.primary_pc)
                return true;
        /* FIXME: Secondary and Capability Point Codes */
        return false;
}

Apparently this global primary_pc is set in osmo_sccp_simple_client().  Since
in the osmo-hnbgw I'm (so far) creating two simple clients with distinct PCs
(IuCS is 23, IuPS is 24), the primary_pc is overwritten with 24. After that we
always fail to notice 23 as a local PC and bounce messages for self right back
down the SCCP stack, because apparently we find a route for 23 instead.

A "matching" route is recognised by osmo_ss7_route_find_dpc():
       if ((dpc & rt->cfg.mask) == rt->cfg.pc)
My own local client gets entered as route, with rt->cfg.mask == 0 and
rt->cfg.pc == 0, so an arbitrary dpc & 0 == 0, matches always. It seems
awfully easy to create a fatal infinite loop flooding the network and CPU --
simply send a message to a DPC neither side sees as local. Anyway...

Which way to go to serve more than one PC in a program?  It appears that either
an osmo_sccp_simple_client() call's local PC or an osmo_sccp_user_bind_pc()'s
PC should be stored&found as a local PC. ... or both.

Is the "right" way to have two PCs: having two osmo_sccp_simple_client()s with
an sccp_user each; or rather one osmo_sccp_simple_client with two users?

Or, should we for the OsmoHNBGW just have one osmo_sccp_simple_client() and one
user, i.e. only one PC to receive both IuCS and IuPS messages? All we do is
feed both of them out to Iuh anyway... (This seems an easy way out of the multi
PC problem, but our MSC wants to serve one PC for BSSAP=2G and one PC for
RANAP=3G, so we will need to solve the multi-PC problem anyway.)

There are many directions I could head to, is any one better than the others?

Thanks!
~N
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.osmocom.org/pipermail/openbsc/attachments/20170621/1fc37c99/attachment.bin>


More information about the OpenBSC mailing list