summaryrefslogtreecommitdiffstats
path: root/lib
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
parentlib: do not reopen a zclient socket for bfd (diff)
downloadfrr-f6e7fbdae9660d7abbb344b5e19fc68fb87bda78.tar.xz
frr-f6e7fbdae9660d7abbb344b5e19fc68fb87bda78.zip
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')
-rw-r--r--lib/bfd.c30
-rw-r--r--lib/bfd.h2
2 files changed, 0 insertions, 32 deletions
diff --git a/lib/bfd.c b/lib/bfd.c
index 2e184898c..9078e3559 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;
diff --git a/lib/bfd.h b/lib/bfd.h
index 91e6d7799..51e831785 100644
--- a/lib/bfd.h
+++ b/lib/bfd.h
@@ -473,8 +473,6 @@ extern bool bfd_protocol_integration_debug(void);
*/
extern bool bfd_protocol_integration_shutting_down(void);
-extern void bfd_nht_zclient_connected(struct zclient *zclient);
-
/* Update nexthop-tracking (nht) information for BFD auto source selection.
* The function must be called from the daemon callback function
* that deals with the ZEBRA_NEXTHOP_UPDATE zclient command