summaryrefslogtreecommitdiffstats
path: root/lib/routemap.c
diff options
context:
space:
mode:
authorRenato Westphal <renato@opensourcerouting.org>2018-10-19 20:55:31 +0200
committerRenato Westphal <renato@opensourcerouting.org>2018-10-20 17:39:05 +0200
commit4cfecc3ea9dd2c4d3d5f5d4a17971f9cc826e14c (patch)
treeb923f0ad215106e8746ce8de46d6d169ce2051e7 /lib/routemap.c
parentbgpd: use the vrf_bitmap_*() helper functions when necessary (diff)
downloadfrr-4cfecc3ea9dd2c4d3d5f5d4a17971f9cc826e14c.tar.xz
frr-4cfecc3ea9dd2c4d3d5f5d4a17971f9cc826e14c.zip
lib: fix the "no match ipv6 next-hop type" command
Trivial NULL pointer dereference bug. Fixes the following crash: bgpd aborted: vtysh -c "configure terminal" -c "route-map RMAP permit 1" -c "no match ipv6 next-hop type" Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
Diffstat (limited to 'lib/routemap.c')
-rw-r--r--lib/routemap.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/routemap.c b/lib/routemap.c
index 3a20ed5cd..6d6267af6 100644
--- a/lib/routemap.c
+++ b/lib/routemap.c
@@ -2251,7 +2251,8 @@ DEFUN(no_match_ipv6_next_hop_type, no_match_ipv6_next_hop_type_cmd,
if (rmap_match_set_hook.no_match_ipv6_next_hop_type)
return rmap_match_set_hook.no_match_ipv6_next_hop_type(
- vty, index, "ipv6 next-hop type", argv[idx_word]->arg,
+ vty, index, "ipv6 next-hop type",
+ (argc <= idx_word) ? NULL : argv[idx_word]->arg,
RMAP_EVENT_MATCH_DELETED);
return CMD_SUCCESS;
}