]> git.proxmox.com Git - mirror_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>
Thu, 21 Feb 2019 02:04:12 +0000 (23:04 -0300)
commitf24f3450c97fe18a3cffc54f31e06cb630544a70
tree6f4e760e684d2c8898a971cd9ecc481cfa4b4878
parentc06c9ded2114055fcba55ee1020d68121f0f1aad
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