]> git.puffer.fish Git - matthieu/frr.git/commit
pbrd: fix removal of ipv6 nexthops
authorRenato Westphal <renato@opensourcerouting.org>
Wed, 20 Feb 2019 18:32:55 +0000 (15:32 -0300)
committerRenato Westphal <renato@opensourcerouting.org>
Wed, 20 Feb 2019 20:10:13 +0000 (17:10 -0300)
commit7e6d3db84ed752c68d79e4da59b9365f74d57b0a
tree11ec146fc50b70354f8ab1bb251249128e981a8b
parentae13cc51d5f3e5205fd092831959dc08775c9f25
pbrd: fix removal of ipv6 nexthops

Fix bug in the code that compares IPv6 addresses. If memcmp()
returns 0 then the two addresses are equal.

Because of this problem, hash_release() could return NULL in a few
places, leading to the following crashes (found by the CLI fuzzer):
pbrd aborted: vtysh -c "configure terminal" -c "pbr-map WORD seq 100" -c "no set nexthop 2001:db8::1"
pbrd aborted: vtysh -c "configure terminal" -c "nexthop-group NHGROUP" -c "no nexthop 2001:db8::1"

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
pbrd/pbr_nht.c