From 277b71e0d8b7a8c53599546b0d06ae3810a290eb Mon Sep 17 00:00:00 2001 From: Jacob Erlbeck Date: Mon, 2 Feb 2015 18:03:05 +0100 Subject: 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 --- openbsc/tests/sgsn/sgsn_test.ok | 1 + 1 file changed, 1 insertion(+) (limited to 'openbsc/tests/sgsn/sgsn_test.ok') diff --git a/openbsc/tests/sgsn/sgsn_test.ok b/openbsc/tests/sgsn/sgsn_test.ok index 9f14721af..bef8c9897 100644 --- a/openbsc/tests/sgsn/sgsn_test.ok +++ b/openbsc/tests/sgsn/sgsn_test.ok @@ -27,4 +27,5 @@ Testing P-TMSI allocation - Repeated Attach Request - Repeated RA Update Request Testing APN matching +Testing GGSN selection Done -- cgit v1.2.3