Change in libosmocore[master]: gprs_ns_vty: return success for disabled FR/GRE

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/.

osmith gerrit-no-reply at lists.osmocom.org
Tue Oct 29 13:58:24 UTC 2019


osmith has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmocore/+/15893 )


Change subject: gprs_ns_vty: return success for disabled FR/GRE
......................................................................

gprs_ns_vty: return success for disabled FR/GRE

Do not return a warning and therefore fail parsing the config when the
"encapsulation framerelay-gre local-ip" command is used and FR/GRE is
disabled. Having this in the config does no harm and allows keeping the
same config if it is enabled later.

This fixes the currently failing vty tests for osmo-sgsn.

Fixes: a0c8195ad37292ab800a6c777fc28383995b4b64 ("vty: Return error if cmd returns CMD_WARNING while reading cfg file")
Change-Id: Ic225232fbfca49ba868427eaf898e1f6e34e1ca8
---
M src/gb/gprs_ns_vty.c
1 file changed, 3 insertions(+), 1 deletion(-)



  git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/93/15893/1

diff --git a/src/gb/gprs_ns_vty.c b/src/gb/gprs_ns_vty.c
index 4a90436..df11bdb 100644
--- a/src/gb/gprs_ns_vty.c
+++ b/src/gb/gprs_ns_vty.c
@@ -510,7 +510,9 @@
 
 	if (!vty_nsi->frgre.enabled) {
 		vty_out(vty, "FR/GRE is not enabled%s", VTY_NEWLINE);
-		return CMD_WARNING;
+		/* Don't return CMD_WARNING here, having the config param even if it is not enabled does not harm and
+		 * allows keeping config if enabled later. */
+		return CMD_SUCCESS;
 	}
 	inet_aton(argv[0], &ia);
 	vty_nsi->frgre.local_ip = osmo_ntohl(ia.s_addr);

-- 
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/15893
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: Ic225232fbfca49ba868427eaf898e1f6e34e1ca8
Gerrit-Change-Number: 15893
Gerrit-PatchSet: 1
Gerrit-Owner: osmith <osmith at sysmocom.de>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20191029/290fd0e9/attachment.htm>


More information about the gerrit-log mailing list