diff options
| author | Renato Westphal <renato@opensourcerouting.org> | 2018-10-19 15:55:31 -0300 |
|---|---|---|
| committer | Renato Westphal <renato@opensourcerouting.org> | 2018-10-20 12:39:05 -0300 |
| commit | 4cfecc3ea9dd2c4d3d5f5d4a17971f9cc826e14c (patch) | |
| tree | b923f0ad215106e8746ce8de46d6d169ce2051e7 | |
| parent | 9f2337c913d0881701597edd419d1ba96b06f109 (diff) | |
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>
| -rw-r--r-- | lib/routemap.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/routemap.c b/lib/routemap.c index 3a20ed5cda..6d6267af6b 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; } |
