]> git.puffer.fish Git - mirror/frr.git/commit
zebra: When shutting down an interface immediately notify about rnh
authorDonald Sharp <sharpd@cumulusnetworks.com>
Thu, 27 Aug 2020 19:00:55 +0000 (15:00 -0400)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Fri, 28 Aug 2020 18:45:59 +0000 (14:45 -0400)
commit0aaa722883245c2109d9856ca0656749860fc579
tree8be81c91921d8eee8d794446dfb095ecb93dfc19
parent5c2bb617630184fcf1e759bb647fd8a323fce4e4
zebra: When shutting down an interface immediately notify about rnh

Imagine a situation where a interface is bouncing up/down.
The interface comes up and daemons like pbr will get a nht
tracking callback for a connected interface up and will install
the routes down to zebra.  At this same time the interface can
go down.  But since zebra is busy handling route changes ( from pbr )
it has not read the netlink message and can get into a situation
where the route resolves properly and then we attempt to install
it into the kernel( which is rejected ).  If the interface
bounces back up fast at this point, the down then up netlink
message will be read and create two route entries off the connected
route node.  Zebra will then enqueue both route entries for future processing.

After this processing happens the down/up is collapsed into an up
and nexthop tracking sees no changes and does not inform any upper
level protocol( in this case pbr ) that nexthop tracking has changed.
So pbr still believes the nexthops are good but the routes are not
installed since pbr has taken no action.

Fix this by immediately running rnh when we signal a connected
route entry is scheduled for removal.  This should cause
upper level protocols to get a rnh notification for the small
amount of time that the connected route was bouncing around like
a madman.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
zebra/connected.c
zebra/kernel_socket.c
zebra/redistribute.c
zebra/rib.h
zebra/rt_netlink.c
zebra/zapi_msg.c
zebra/zebra_rib.c