summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2019-10-22 18:38:01 +0200
committerlaforge <laforge@osmocom.org>2019-10-28 19:15:29 +0000
commita0c8195ad37292ab800a6c777fc28383995b4b64 (patch)
tree039f73a1546dfd238af4f89aef66789e0742eaf5 /src
parentea2afb21d69f5227263f6b227edcb1e9cc5b0e54 (diff)
vty: Return error if cmd returns CMD_WARNING while reading cfg file
Otherwise bad configurations can easily sneak in and produce unexpected behavior. Change-Id: Ic9c1b566ec4a459f03e6319cf369691903cf9d00
Diffstat (limited to 'src')
-rw-r--r--src/vty/command.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/vty/command.c b/src/vty/command.c
index a36f30a3..6a9d18af 100644
--- a/src/vty/command.c
+++ b/src/vty/command.c
@@ -2631,8 +2631,7 @@ int config_from_file(struct vty *vty, FILE * fp)
ret = cmd_execute_command_strict(vline, vty, NULL);
cmd_free_strvec(vline);
- if (ret != CMD_SUCCESS && ret != CMD_WARNING
- && ret != CMD_ERR_NOTHING_TODO) {
+ if (ret != CMD_SUCCESS && ret != CMD_ERR_NOTHING_TODO) {
if (indent) {
talloc_free(indent);
indent = NULL;