gprs_ns2_sns: Allow VTY configuration of default binds for IP-SNS
In the IP-SNS SGSN role, we need to inform the BSS of our local
IP endpoints. For statically configured NSEs, those are explicitly
stated on a per-NSE level.
For dynamically created IP-SNS NSEs, we are adding a new VTY
command, using which the administrator can configure which binds
should be advertised as IP endpoints to such BSS.
Change-Id: Id01c29b07e9203c9305f2129361a4f5aaefa2c52
Related: OS#3373
diff --git a/src/gb/gprs_ns2.c b/src/gb/gprs_ns2.c
index 21a2d22..4d27333 100644
--- a/src/gb/gprs_ns2.c
+++ b/src/gb/gprs_ns2.c
@@ -933,8 +933,9 @@
LOGP(DLNS, LOGL_ERROR, "Failed to create NSE(%05u)\n", nsei);
return NS2_CS_ERROR;
}
- gprs_ns2_sns_add_bind(nse, bind);
- /* TODO: add (configured) list of other binds */
+ /* add configured list of default binds; if that fails, use only current bind */
+ if (!ns2_sns_add_sns_default_binds(nse))
+ gprs_ns2_sns_add_bind(nse, bind);
} else {
/* nsei already known */
if (nse->ll != bind->ll) {