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/.
laforge gerrit-no-reply at lists.osmocom.orglaforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmocore/+/23413 )
Change subject: gprs_ns2_vty: Permit VTY configuration of bind->accept_sns
......................................................................
gprs_ns2_vty: Permit VTY configuration of bind->accept_sns
Related: OS#3373
Change-Id: Ifb52cd245b10bf47d42d57d167d6d6c02b12ee12
---
M src/gb/gprs_ns2_vty.c
1 file changed, 49 insertions(+), 1 deletion(-)
git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/13/23413/1
diff --git a/src/gb/gprs_ns2_vty.c b/src/gb/gprs_ns2_vty.c
index 3b006f1..47a888f 100644
--- a/src/gb/gprs_ns2_vty.c
+++ b/src/gb/gprs_ns2_vty.c
@@ -462,6 +462,8 @@
}
if (vbind->accept_ipaccess)
vty_out(vty, " accept-ipaccess%s", VTY_NEWLINE);
+ if (vbind->accept_sns)
+ vty_out(vty, " accept-dynamic-ip-sns%s", VTY_NEWLINE);
if (vbind->dscp)
vty_out(vty, " dscp %u%s", vbind->dscp, VTY_NEWLINE);
vty_out(vty, " ip-sns signalling-weight %u data-weight %u%s",
@@ -757,6 +759,51 @@
return CMD_SUCCESS;
}
+DEFUN(cfg_ns_bind_accept_sns, cfg_ns_bind_accept_sns_cmd,
+ "accept-dynamic-ip-sns",
+ "Allow to create dynamic NS Entities by IP-SNS PDUs\n"
+ )
+{
+ struct vty_bind *vbind = vty->index;
+ struct gprs_ns2_vc_bind *bind;
+
+ if (vbind->ll != GPRS_NS2_LL_UDP) {
+ vty_out(vty, "accept-dynamic-ip-sns can be only used with UDP bind%s",
+ VTY_NEWLINE);
+ return CMD_WARNING;
+ }
+
+ vbind->accept_sns = true;
+ bind = gprs_ns2_bind_by_name(vty_nsi, vbind->name);
+ if (bind)
+ bind->accept_sns = true;
+
+ return CMD_SUCCESS;
+}
+
+DEFUN(cfg_no_ns_bind_accept_sns, cfg_no_ns_bind_accept_sns_cmd,
+ "no accept-dynamic-ip-sns",
+ NO_STR
+ "Disable dynamic creation of NS Entities by IP-SNS PDUs\n"
+ )
+{
+ struct vty_bind *vbind = vty->index;
+ struct gprs_ns2_vc_bind *bind;
+
+ if (vbind->ll != GPRS_NS2_LL_UDP) {
+ vty_out(vty, "no accept-dynamic-ip-sns can be only used with UDP bind%s",
+ VTY_NEWLINE);
+ return CMD_WARNING;
+ }
+
+ vbind->accept_sns = false;
+ bind = gprs_ns2_bind_by_name(vty_nsi, vbind->name);
+ if (bind)
+ bind->accept_sns = false;
+
+ return CMD_SUCCESS;
+}
+
DEFUN(cfg_ns_bind_ip_sns_weight, cfg_ns_bind_ip_sns_weight_cmd,
"ip-sns signalling-weight <0-254> data-weight <0-254>",
"IP SNS\n"
@@ -2061,7 +2108,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);
- /* TODO: accept-ip-sns when SGSN SNS has been implemented */
+ install_lib_element(L_NS_BIND_NODE, &cfg_ns_bind_accept_sns_cmd);
+ install_lib_element(L_NS_BIND_NODE, &cfg_no_ns_bind_accept_sns_cmd);
install_node(&ns_nse_node, NULL);
install_lib_element(L_NS_NSE_NODE, &cfg_ns_nse_nsvc_fr_cmd);
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/23413
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: Ifb52cd245b10bf47d42d57d167d6d6c02b12ee12
Gerrit-Change-Number: 23413
Gerrit-PatchSet: 1
Gerrit-Owner: laforge <laforge at osmocom.org>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210319/b6ae87f1/attachment.htm>