diff options
| author | Donald Sharp <sharpd@nvidia.com> | 2024-12-05 10:16:03 -0500 |
|---|---|---|
| committer | Donatas Abraitis <donatas@opensourcerouting.org> | 2025-02-10 09:41:11 +0200 |
| commit | 8c3b2ed3bf95e0be58eb479be1a59bf090bb15ff (patch) | |
| tree | e9370e982afd1e744abeeb60413863d851a71bc9 /bgpd | |
| parent | 9b8c257e6c1f3659e5d7da5954511e76e0c09ab9 (diff) | |
bgpd: When bgp notices a change to shared_network inform bfd of it
When bgp is started up and reads the config in *before* it has
received interface addresses from zebra, shared_network can
be set to false in this case. Later on once bgp attempts to
reconnect it will refigure out the shared_network again( because
it has received the data from zebra now ). In this case
tell bfd about it.
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Diffstat (limited to 'bgpd')
| -rw-r--r-- | bgpd/bgp_zebra.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/bgpd/bgp_zebra.c b/bgpd/bgp_zebra.c index 07ab822b03..9fa04e5420 100644 --- a/bgpd/bgp_zebra.c +++ b/bgpd/bgp_zebra.c @@ -744,6 +744,7 @@ bool bgp_zebra_nexthop_set(union sockunion *local, union sockunion *remote, int ret = 0; struct interface *ifp = NULL; bool v6_ll_avail = true; + bool shared_network_original = peer->shared_network; memset(nexthop, 0, sizeof(struct bgp_nexthop)); @@ -908,6 +909,9 @@ bool bgp_zebra_nexthop_set(union sockunion *local, union sockunion *remote, peer->shared_network = 0; } + if (shared_network_original != peer->shared_network) + bgp_peer_bfd_update_source(peer); + /* KAME stack specific treatment. */ #ifdef KAME if (IN6_IS_ADDR_LINKLOCAL(&nexthop->v6_global) |
