osmo-msc/openbsc/tests/sgsn
Jacob Erlbeck 277b71e0d8 sgsn: Select GGSN based on APN
Currently the APN IE in the Activate PDP Contex Request and the PDP
data that is stored with the subscriber is ignored completely.

This commit adds the sgsn_mm_ctx_find_ggsn_ctx that checks the APN IE
against the subscriber's PDP data entries if both are present. If
there is no match, the request is rejected.

If an APN IE has not been included but PDP data entries are present,
the function checks all of these entries against the static 'apn'
configuration to find a suitable entry.

If an APN has not been determined so far and any APN is allowed, the
configuration is checked with an empty APN string, to allow for
default configurations based on the IMSI prefix only.

If nothing of this succeeded but the request wasn't rejected either,
and there is no 'apn' configuration at all or if any APN is allowed
but a default configuration ist not present, the GGSN with id 0 is
used (if present).

Otherwise the request is rejected ('missing APN').

Ticket: OW#1334
Sponsored-by: On-Waves ehf
2015-02-06 13:00:29 +01:00
..
Makefile.am sgsn: Remove inactive LLME/MM after inactivity timeout 2015-01-26 08:51:50 +01:00
sgsn_test.c sgsn: Select GGSN based on APN 2015-02-06 13:00:29 +01:00
sgsn_test.ok sgsn: Select GGSN based on APN 2015-02-06 13:00:29 +01:00