]> git.proxmox.com Git - mirror_frr.git/commit
bgpd: Ensure suppress-fib-pending works with network statements
authorDonald Sharp <sharpd@nvidia.com>
Wed, 22 Mar 2023 15:35:28 +0000 (11:35 -0400)
committerDonald Sharp <sharpd@nvidia.com>
Wed, 22 Mar 2023 15:35:28 +0000 (11:35 -0400)
commit3fdb2079f6ba6d9dd94386ba471055cdc9295147
treeab7396359c9ba86a4e6c5669b008a04cae0fdf6a
parent51655ef01a89f4e31c1ffe89f702ba975c106465
bgpd: Ensure suppress-fib-pending works with network statements

The flag for telling BGP that a route is expected to be installed
first before notifying a peer was always being set upon receipt
of a path that could be accepted as bestpath.  This is not correct:
imagine that you have a peer sending you a route and you have a
network statement that covers the same route.  Irrelevant if the
network statement would win the flag on the dest was being set
in bgp_update.  Thus you could get into a situation where
the network statement path wins but since the flag is set on
the node, it will never be announced to a peer.

Let's just move the setting of the flag into bgp_zebra_announce
and _withdraw.  In _announce set the flag to TRUE when suppress-fib
is enabled.  In _withdraw just always unset the flag as that a withdrawal
does not need to wait for rib removal before announcing.  This will
cover the case when a network statement is added after the route has
been learned from a peer.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
bgpd/bgp_route.c
bgpd/bgp_zebra.c
tests/topotests/bgp_suppress_fib/test_bgp_suppress_fib.py