]> git.puffer.fish Git - matthieu/frr.git/commit
vrrpd: search all vr's for mvl_ifp to null
authorQuentin Young <qlyoung@cumulusnetworks.com>
Wed, 4 Mar 2020 23:54:04 +0000 (18:54 -0500)
committerQuentin Young <qlyoung@cumulusnetworks.com>
Thu, 5 Mar 2020 19:22:49 +0000 (14:22 -0500)
commit2681134b859a33e088f7cf8d4a3836b775a07ace
tree802560965a2c51fd59225ed61876545f7b2563e9
parent61980c71c435f19142b32fdb7bf7d214a534684c
vrrpd: search all vr's for mvl_ifp to null

Previous patch was not sufficient to make sure the pointers get nulled.
Reason being is that vrrp_lookup_by_if_mvl() follows the link_ifindex on
the provided interface to acquire the base ifp, which is then used to
lookup the VR. However, because FRR's interface management is straight
up insane, it's possible that we delete the base interface before its
children. When this happens, link_ifindex is still valid for the macvlan
device but we have no interface corresponding to that ifindex, so our
lookup will fail. Consequently vrrp_lookup_by_if_mvl() can't be used if
we are handling deletion of any sort. Instead we have to loop through
every VR and check the pointers.

Also, there's no null check on the mvl_ifp pointer in vrrp_shutdown(),
and even though we log that we're returning early from it, we actually
don't. Do both of these things.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
vrrpd/vrrp.c