From a0c8195ad37292ab800a6c777fc28383995b4b64 Mon Sep 17 00:00:00 2001 From: Pau Espin Pedrol Date: Tue, 22 Oct 2019 18:38:01 +0200 Subject: 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 --- src/vty/command.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src') 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; -- cgit v1.2.3