summaryrefslogtreecommitdiffstats
path: root/ldpd
diff options
context:
space:
mode:
authorRenato Westphal <renato@opensourcerouting.org>2017-07-25 00:48:08 +0200
committerRenato Westphal <renato@opensourcerouting.org>2017-07-31 13:54:26 +0200
commitdbaaa5396c554d08ad839b9ed41de3d9951b5add (patch)
tree4238ff2fc9bd5d7e957e07b5b4f8c4aefa07b509 /ldpd
parentMerge pull request #856 from opensourcerouting/cli-fuzzer-fixes (diff)
downloadfrr-dbaaa5396c554d08ad839b9ed41de3d9951b5add.tar.xz
frr-dbaaa5396c554d08ad839b9ed41de3d9951b5add.zip
ldpd: fix segfault in "clear mpls ldp neighbor [addr]"
Bug introduced by the CLI refactoring (c740f7d3678). Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
Diffstat (limited to 'ldpd')
-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 871905aa8..8a8d903a6 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));
}