summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRenato Westphal <renato@opensourcerouting.org>2017-07-24 19:48:08 -0300
committerRenato Westphal <renato@opensourcerouting.org>2017-07-31 08:54:26 -0300
commitdbaaa5396c554d08ad839b9ed41de3d9951b5add (patch)
tree4238ff2fc9bd5d7e957e07b5b4f8c4aefa07b509
parentff9f629d47b78d2b3b4ee2c912280c89d72565be (diff)
ldpd: fix segfault in "clear mpls ldp neighbor [addr]"
Bug introduced by the CLI refactoring (c740f7d3678). Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
-rw-r--r--ldpd/ldp_vty_cmds.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/ldpd/ldp_vty_cmds.c b/ldpd/ldp_vty_cmds.c
index 871905aa8f..8a8d903a61 100644
--- a/ldpd/ldp_vty_cmds.c
+++ b/ldpd/ldp_vty_cmds.c
@@ -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));
}