]> git.puffer.fish Git - matthieu/frr.git/commit
staticd: fix changing to source auto in bfd monitor
authorLouis Scalbert <louis.scalbert@6wind.com>
Thu, 30 Nov 2023 16:29:20 +0000 (17:29 +0100)
committerMergify <37929162+mergify[bot]@users.noreply.github.com>
Wed, 6 Dec 2023 13:06:16 +0000 (13:06 +0000)
commit98b3e5686f9ae887c2296d9f3baab2f34b3228c5
tree6e0649ed89a484fcda56d1093380a951304767e3
parentc2a5bcfdb88a34ed497e5b914c193ff6b82b04b0
staticd: fix changing to source auto in bfd monitor

When monitoring a static route with BFD multi-hop, the source IP can be
either configured or retrieved from NextHop-Tracking (NHT). After
removing a configured source, the source is supposed to be retrieved
from NHT but it remains to the previous value. This is problematic if
the user desires to fix the configuration of a incorrect source IP.

For example, theses two commands results in the incorrect state:

> ip route 10.0.0.0/24 10.1.0.1 bfd multi-hop source 10.2.2.2
> ip route 10.0.0.0/24 10.1.0.1 bfd multi-hop

When removing the source, BFD is unable to find the source from NHT via
bfd_nht_update() were called.

Force zebra to resend the information to BFD by unregistering and
registering again NHT. The (...)/frr-nexthops/nexthop northbound
apply_finish function will trigger a call to static_install_nexthop()
that does a call to static_zebra_nht_register(nh, true);

Fixes: b7ca809d1c ("lib: BFD automatic source selection")
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
(cherry picked from commit 580c605194b3893a1d61a997a7b9d62e2d877427)
staticd/static_nb_config.c