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 submitted this change. ( https://gerrit.osmocom.org/c/libosmocore/+/22522 )
Change subject: gprs_ns2: correct vty config write
......................................................................
gprs_ns2: correct vty config write
The vty configuration was wrong when any other node was
in between the vty configuration (e.g. gb or ss7).
The vty code doesn't have a relation between parent and child node.
It wasn't detected because this only happened in the sgsn.
The pcu doesn't have any binds defined.
Change-Id: I8a3d67d41baca36b4d1a951a574cd41e556355c5
---
M src/gb/gprs_ns2_vty.c
1 file changed, 26 insertions(+), 16 deletions(-)
Approvals:
Jenkins Builder: Verified
daniel: Looks good to me, approved
diff --git a/src/gb/gprs_ns2_vty.c b/src/gb/gprs_ns2_vty.c
index 9db8173..1c40759 100644
--- a/src/gb/gprs_ns2_vty.c
+++ b/src/gb/gprs_ns2_vty.c
@@ -401,20 +401,6 @@
}
}
-static int config_write_ns(struct vty *vty)
-{
- unsigned int i;
-
- vty_out(vty, "ns%s", VTY_NEWLINE);
-
- for (i = 0; i < ARRAY_SIZE(vty_nsi->timeout); i++)
- vty_out(vty, " timer %s %u%s",
- get_value_string(gprs_ns_timer_strs, i),
- vty_nsi->timeout[i], VTY_NEWLINE);
-
- return 0;
-}
-
static int config_write_ns_nse(struct vty *vty)
{
struct gprs_ns2_nse *nse;
@@ -440,6 +426,30 @@
return 0;
}
+static int config_write_ns(struct vty *vty)
+{
+ unsigned int i;
+ int ret;
+
+ vty_out(vty, "ns%s", VTY_NEWLINE);
+
+ for (i = 0; i < ARRAY_SIZE(vty_nsi->timeout); i++)
+ vty_out(vty, " timer %s %u%s",
+ get_value_string(gprs_ns_timer_strs, i),
+ vty_nsi->timeout[i], VTY_NEWLINE);
+
+ ret = config_write_ns_bind(vty);
+ if (ret)
+ return ret;
+
+ ret = config_write_ns_nse(vty);
+ if (ret)
+ return ret;
+
+ return 0;
+}
+
+
static struct cmd_node ns_bind_node = {
L_NS_BIND_NODE,
"%s(config-ns-bind)# ",
@@ -1665,7 +1675,7 @@
install_lib_element(L_NS_NODE, &cfg_ns_bind_cmd);
install_lib_element(L_NS_NODE, &cfg_no_ns_bind_cmd);
- install_node(&ns_bind_node, config_write_ns_bind);
+ install_node(&ns_bind_node, NULL);
install_lib_element(L_NS_BIND_NODE, &cfg_ns_bind_listen_cmd);
install_lib_element(L_NS_BIND_NODE, &cfg_no_ns_bind_listen_cmd);
install_lib_element(L_NS_BIND_NODE, &cfg_ns_bind_dscp_cmd);
@@ -1676,7 +1686,7 @@
install_lib_element(L_NS_BIND_NODE, &cfg_no_ns_bind_fr_cmd);
/* TODO: accept-ip-sns when SGSN SNS has been implemented */
- install_node(&ns_nse_node, config_write_ns_nse);
+ install_node(&ns_nse_node, NULL);
install_lib_element(L_NS_NSE_NODE, &cfg_ns_nse_nsvc_fr_cmd);
install_lib_element(L_NS_NSE_NODE, &cfg_no_ns_nse_nsvci_cmd);
install_lib_element(L_NS_NSE_NODE, &cfg_no_ns_nse_nsvc_fr_dlci_cmd);
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/22522
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I8a3d67d41baca36b4d1a951a574cd41e556355c5
Gerrit-Change-Number: 22522
Gerrit-PatchSet: 1
Gerrit-Owner: lynxis lazus <lynxis at fe80.eu>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel <dwillmann at sysmocom.de>
Gerrit-Reviewer: lynxis lazus <lynxis at fe80.eu>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210128/46ae9f93/attachment.htm>