This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
lynxis lazus gerrit-no-reply at lists.osmocom.orglynxis lazus has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmocore/+/22626 )
Change subject: gprs_ns2: add bind vty exclude-sns-configuration
......................................................................
gprs_ns2: add bind vty exclude-sns-configuration
Allow to exclude a udp bind from SNS configuration when
connecting to a SGSN.
Change-Id: Ifb294d449f084c1ea693c7b99f1a65e99f38ea37
---
M src/gb/gprs_ns2_internal.h
M src/gb/gprs_ns2_sns.c
M src/gb/gprs_ns2_vty.c
3 files changed, 55 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/26/22626/1
diff --git a/src/gb/gprs_ns2_internal.h b/src/gb/gprs_ns2_internal.h
index 2584a03..fb91395 100644
--- a/src/gb/gprs_ns2_internal.h
+++ b/src/gb/gprs_ns2_internal.h
@@ -253,6 +253,8 @@
bool accept_ipaccess;
bool accept_sns;
+ /*! if true, this bind will *not* be used when connecting to a SGSN with dynamic configurating IP-SNS */
+ bool exclude_ip_sns_configuration;
/*! transfer capability in mbit */
int transfer_capability;
diff --git a/src/gb/gprs_ns2_sns.c b/src/gb/gprs_ns2_sns.c
index 427a153..2a934d7 100644
--- a/src/gb/gprs_ns2_sns.c
+++ b/src/gb/gprs_ns2_sns.c
@@ -279,6 +279,9 @@
llist_for_each_entry(bind, &nsi->binding, list) {
if (bind->ll != GPRS_NS2_LL_UDP)
continue;
+
+ if (!bind->exclude_ip_sns_configuration)
+ continue;
/* ignore failed connection */
nsvc = gprs_ns2_ip_connect_inactive(bind,
remote,
diff --git a/src/gb/gprs_ns2_vty.c b/src/gb/gprs_ns2_vty.c
index 5d0f5c0..af93f44 100644
--- a/src/gb/gprs_ns2_vty.c
+++ b/src/gb/gprs_ns2_vty.c
@@ -66,6 +66,7 @@
int dscp;
bool accept_ipaccess;
bool accept_sns;
+ bool exclude_ip_sns_configuration;
};
/* TODO: this should into osmo timer */
@@ -325,6 +326,8 @@
}
if (vbind->accept_ipaccess)
vty_out(vty, " accept-ipaccess%s", VTY_NEWLINE);
+ if (vbind->exclude_ip_sns_configuration)
+ vty_out(vty, " exclude-sns-configuration%s", VTY_NEWLINE);
if (vbind->dscp)
vty_out(vty, " dscp %u%s", vbind->dscp, VTY_NEWLINE);
break;
@@ -587,6 +590,51 @@
return CMD_SUCCESS;
}
+DEFUN(cfg_ns_bind_sns_configuration, cfg_ns_bind_sns_configuration_cmd,
+ "exclude-sns-configuration",
+ "Exclude this bind from SNS configuration when connecting to a SGSN\n"
+ )
+{
+ struct vty_bind *vbind = vty->index;
+ struct gprs_ns2_vc_bind *bind;
+
+ if (vbind->ll != GPRS_NS2_LL_UDP) {
+ vty_out(vty, "exclude-sns-configuration can be only used with UDP binds%s",
+ VTY_NEWLINE);
+ return CMD_WARNING;
+ }
+
+ vbind->exclude_ip_sns_configuration = true;
+ bind = gprs_ns2_bind_by_name(vty_nsi, vbind->name);
+ if (bind)
+ bind->exclude_ip_sns_configuration = true;
+
+ return CMD_SUCCESS;
+}
+
+DEFUN(cfg_no_ns_bind_sns_configuration, cfg_no_ns_bind_sns_configuration_cmd,
+ "no exclude-sns-configuration",
+ NO_STR
+ "Include this bind from SNS configuration when connecting to a SGSN\n"
+ )
+{
+ struct vty_bind *vbind = vty->index;
+ struct gprs_ns2_vc_bind *bind;
+
+ if (vbind->ll != GPRS_NS2_LL_UDP) {
+ vty_out(vty, "exclude-sns-configuration can be only used with UDP binds%s",
+ VTY_NEWLINE);
+ return CMD_WARNING;
+ }
+
+ vbind->exclude_ip_sns_configuration = false;
+ bind = gprs_ns2_bind_by_name(vty_nsi, vbind->name);
+ if (bind)
+ bind->exclude_ip_sns_configuration = false;
+
+ return CMD_SUCCESS;
+}
+
DEFUN(cfg_no_ns_bind_ipaccess, cfg_no_ns_bind_ipaccess_cmd,
"no accept-ipaccess",
NO_STR
@@ -1688,6 +1736,8 @@
install_lib_element(L_NS_BIND_NODE, &cfg_no_ns_bind_ipaccess_cmd);
install_lib_element(L_NS_BIND_NODE, &cfg_ns_bind_fr_cmd);
install_lib_element(L_NS_BIND_NODE, &cfg_no_ns_bind_fr_cmd);
+ install_lib_element(L_NS_BIND_NODE, &cfg_ns_bind_sns_configuration_cmd);
+ install_lib_element(L_NS_BIND_NODE, &cfg_no_ns_bind_sns_configuration_cmd);
/* TODO: accept-ip-sns when SGSN SNS has been implemented */
install_node(&ns_nse_node, NULL);
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/22626
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: Ifb294d449f084c1ea693c7b99f1a65e99f38ea37
Gerrit-Change-Number: 22626
Gerrit-PatchSet: 1
Gerrit-Owner: lynxis lazus <lynxis at fe80.eu>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210202/f9a42ce1/attachment.htm>