]> git.puffer.fish Git - mirror/frr.git/commitdiff
ldpd: fix segfault in "clear mpls ldp neighbor [addr]"
authorRenato Westphal <renato@opensourcerouting.org>
Mon, 24 Jul 2017 22:48:08 +0000 (19:48 -0300)
committerRenato Westphal <renato@opensourcerouting.org>
Mon, 31 Jul 2017 11:54:26 +0000 (08:54 -0300)
Bug introduced by the CLI refactoring (c740f7d3678).

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
ldpd/ldp_vty_cmds.c

index 871905aa8f57490e8907e963b2f03eaf83329eab..8a8d903a6110e2aba8010b341a6e70e44cdd4763 100644 (file)
@@ -759,8 +759,9 @@ DEFUN  (ldp_clear_mpls_ldp_neighbor,
        int              idx = 0;
        const char      *address = NULL;
 
-       if (argv_find(argv, argc, "neighbor", &idx))
-               address = argv[idx + 1]->arg;
+       if (argv_find(argv, argc, "A.B.C.D", &idx) ||
+           argv_find(argv, argc, "X:X::X:X", &idx))
+               address = argv[idx]->arg;
 
        return (ldp_vty_clear_nbr(vty, address));
 }