summaryrefslogtreecommitdiff
path: root/lib/bfd.c
diff options
context:
space:
mode:
authorLouis Scalbert <louis.scalbert@6wind.com>2023-01-23 13:33:22 +0100
committerLouis Scalbert <louis.scalbert@6wind.com>2023-01-24 16:08:26 +0100
commitf6e7fbdae9660d7abbb344b5e19fc68fb87bda78 (patch)
treefa1972555a341326fba46b85ebac6e9f215731e9 /lib/bfd.c
parenta77ea81ef34c05bd2b84260c7bbbf9d32443ca7f (diff)
lib: remove concurrent nexthop zapi (un)registration
Daemons like staticd already implement nexthop zapi (un)registration. b7ca809d1c ("lib: BFD automatic source selection") has implemented a concurrent nexthop (un)registration. Some nexthop could be unregistred by the bfd whereas they were still needed by the daemon. Let the deamons deal with nexthop zapi (un)registration. Fixes: b7ca809d1c ("lib: BFD automatic source selection") Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
Diffstat (limited to 'lib/bfd.c')
-rw-r--r--lib/bfd.c30
1 files changed, 0 insertions, 30 deletions
diff --git a/lib/bfd.c b/lib/bfd.c
index 2e184898c4..9078e3559f 100644
--- a/lib/bfd.c
+++ b/lib/bfd.c
@@ -149,22 +149,6 @@ static const struct in6_addr i6a_zero;
static void bfd_source_cache_get(struct bfd_session_params *session);
static void bfd_source_cache_put(struct bfd_session_params *session);
-static inline void
-bfd_source_cache_register(const struct bfd_source_cache *source)
-{
- zclient_send_rnh(bsglobal.zc, ZEBRA_NEXTHOP_REGISTER, &source->address,
- SAFI_UNICAST, false, false, source->vrf_id);
-}
-
-static inline void
-bfd_source_cache_unregister(const struct bfd_source_cache *source)
-{
- zclient_send_rnh(bsglobal.zc, ZEBRA_NEXTHOP_UNREGISTER,
- &source->address, SAFI_UNICAST, false, false,
- source->vrf_id);
-}
-
-
/*
* bfd_get_peer_info - Extract the Peer information for which the BFD session
* went down from the message sent from Zebra to clients.
@@ -1226,8 +1210,6 @@ static void bfd_source_cache_get(struct bfd_session_params *session)
session->source_cache = source;
source->refcount = 1;
- bfd_source_cache_register(source);
-
return;
}
@@ -1242,7 +1224,6 @@ static void bfd_source_cache_put(struct bfd_session_params *session)
return;
}
- bfd_source_cache_unregister(session->source_cache);
SLIST_REMOVE(&bsglobal.source_list, session->source_cache,
bfd_source_cache, entry);
XFREE(MTYPE_BFD_SOURCE, session->source_cache);
@@ -1352,17 +1333,6 @@ static bool bfd_source_cache_update(struct bfd_source_cache *source,
return false;
}
-void bfd_nht_zclient_connected(struct zclient *zclient)
-{
- struct bfd_source_cache *source;
-
- if (bsglobal.debugging)
- zlog_debug("BFD NHT zclient connected");
-
- SLIST_FOREACH (source, &bsglobal.source_list, entry)
- bfd_source_cache_register(source);
-}
-
int bfd_nht_update(const struct prefix *match, const struct zapi_route *route)
{
struct bfd_source_cache *source;