diff options
author | Renato Westphal <renato@opensourcerouting.org> | 2017-07-25 00:48:08 +0200 |
---|---|---|
committer | Renato Westphal <renato@opensourcerouting.org> | 2017-07-31 13:54:26 +0200 |
commit | dbaaa5396c554d08ad839b9ed41de3d9951b5add (patch) | |
tree | 4238ff2fc9bd5d7e957e07b5b4f8c4aefa07b509 /ldpd | |
parent | Merge pull request #856 from opensourcerouting/cli-fuzzer-fixes (diff) | |
download | frr-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.c | 5 |
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)); } |