aboutsummaryrefslogtreecommitdiffstats
path: root/src/gprs/gprs_subscriber.c
diff options
context:
space:
mode:
authorStefan Sperling <ssperling@sysmocom.de>2018-12-11 14:42:00 +0100
committerStefan Sperling <ssperling@sysmocom.de>2018-12-20 16:13:00 +0100
commit882200929f0f5173086664a77ec88cde34253640 (patch)
tree0d7a7d4d876fe785852d2d31ae6c85dfbf10a003 /src/gprs/gprs_subscriber.c
parent2599644d8161e6a091596e313ece56189d12348f (diff)
make gsup ipa name configurable in osmo-sgsn.cfg
Add a 'gsup ipa-name' VTY command which overrides the default IPA name used by the SGSN on the GSUP link towards the HLR. This is required for GSUP routing in multi-SGSN networks. The 'gsup ipa-name' option can only be set via the config file because changing the IPA name at run-time conflicts with active GSUP connections and routes configured in the HLR. The osmo-sgsn program must be restarted if its IPA name needs to change. Related: OS#3356 Change-Id: Ib2f65fed9f56b9718e8a9647e3f01dce69870c1f
Diffstat (limited to 'src/gprs/gprs_subscriber.c')
-rw-r--r--src/gprs/gprs_subscriber.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/gprs/gprs_subscriber.c b/src/gprs/gprs_subscriber.c
index 4ab45c288..484c7ef4e 100644
--- a/src/gprs/gprs_subscriber.c
+++ b/src/gprs/gprs_subscriber.c
@@ -23,6 +23,7 @@
#include <osmocom/gsm/protocol/gsm_04_08_gprs.h>
#include <osmocom/gsm/gsup.h>
#include <osmocom/gsm/apn.h>
+#include <osmocom/gsm/ipa.h>
#include <osmocom/core/utils.h>
#include <osmocom/core/logging.h>
#include <osmocom/sgsn/gprs_subscriber.h>
@@ -63,15 +64,20 @@ static int gsup_read_cb(struct osmo_gsup_client *gsupc, struct msgb *msg);
int gprs_subscr_init(struct sgsn_instance *sgi)
{
const char *addr_str;
+ struct ipaccess_unit *ipa_dev;
if (!sgi->cfg.gsup_server_addr.sin_addr.s_addr)
return 0;
addr_str = inet_ntoa(sgi->cfg.gsup_server_addr.sin_addr);
- sgi->gsup_client = osmo_gsup_client_create(
+ ipa_dev = talloc_zero(sgi, struct ipaccess_unit);
+ ipa_dev->unit_name = "SGSN";
+ ipa_dev->serno = sgi->cfg.sgsn_ipa_name; /* NULL unless configured via VTY */
+
+ sgi->gsup_client = osmo_gsup_client_create2(
sgi,
- "SGSN",
+ ipa_dev,
addr_str, sgi->cfg.gsup_server_port,
&gsup_read_cb,
&sgi->cfg.oap);