gprs_ns2: rework IP-SNS binds

Introduce a `ip-sns-bind BINDID` vty command within a `nse` vty object.
The ip-sns-bind defines the binds which will be used by the dynamic
configuration with IP-SNS.
This is only the first part which only uses the binds when doing a
new SNS configuration.
The outgoing add procedure will be supported in a later patch
when the SNS fsm supports outgoing procedures.

This is a behaviour change of the API and must be synchronized with
the osmo-pcu. Otherwise SNS won't work with osmo-pcu.

Related: SYS#5354
Change-Id: I9ab8092bf286e7d90e92f5702a5404425e959c84
diff --git a/src/gb/gprs_ns2.c b/src/gb/gprs_ns2.c
index 9302a16..bc4db53 100644
--- a/src/gb/gprs_ns2.c
+++ b/src/gb/gprs_ns2.c
@@ -1269,6 +1269,7 @@
 void gprs_ns2_free_bind(struct gprs_ns2_vc_bind *bind)
 {
 	struct gprs_ns2_vc *nsvc, *tmp;
+	struct gprs_ns2_nse *nse;
 	if (!bind)
 		return;
 
@@ -1276,6 +1277,12 @@
 		gprs_ns2_free_nsvc(nsvc);
 	}
 
+	if (gprs_ns2_is_ip_bind(bind)) {
+		llist_for_each_entry(nse, &bind->nsi->nse, list) {
+			gprs_ns2_sns_del_bind(nse, bind);
+		}
+	}
+
 	if (bind->driver->free_bind)
 		bind->driver->free_bind(bind);