]> git.puffer.fish Git - mirror/frr.git/commitdiff
lib: CMD_FERR_RETURN should return CMD_WARNING_CONFIG_FAILED 1192/head
authorDaniel Walton <dwalton@cumulusnetworks.com>
Mon, 18 Sep 2017 15:07:40 +0000 (15:07 +0000)
committerDaniel Walton <dwalton@cumulusnetworks.com>
Mon, 18 Sep 2017 15:07:40 +0000 (15:07 +0000)
Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
Testing the patch:

root@cel-redxp-10[frr-dwalton76]# vtysh -c 'conf t' -c ' int vlan2' -c
'ip igmp join 233.200.0.1 10.1.1.1'
Failure joining IGMP group: multicast not enabled on interface vlan2
root@cel-redxp-10[frr-dwalton76]# echo $?
1
root@cel-redxp-10[frr-dwalton76]

lib/ferr.h

index a5706373721324f1e303b55faf664a6dbba6805b..c4f83f17102003809fde9ce3c62e849a72d65fcc 100644 (file)
@@ -162,7 +162,7 @@ void vty_print_error(struct vty *vty, ferr_r err, const char *msg, ...);
        } while (0)
 
 #define CMD_FERR_RETURN(func, ...) \
-       CMD_FERR_DO(func, return CMD_WARNING, __VA_ARGS__)
+       CMD_FERR_DO(func, return CMD_WARNING_CONFIG_FAILED, __VA_ARGS__)
 #define CMD_FERR_GOTO(func, label, ...) \
        CMD_FERR_DO(func, goto label, __VA_ARGS__)