diff options
author | Christian Franke <chris@opensourcerouting.org> | 2018-09-20 15:09:43 +0200 |
---|---|---|
committer | Christian Franke <chris@opensourcerouting.org> | 2018-10-05 14:04:15 +0200 |
commit | 4943f243b5cec95fe39374ba2b07f7d6a628a94d (patch) | |
tree | 00c347307c22cfaae746db35bc002c20e60456cb /zebra/zebra_ptm_redistribute.c | |
parent | Merge pull request #3098 from opensourcerouting/watchfrr-delay (diff) | |
download | frr-4943f243b5cec95fe39374ba2b07f7d6a628a94d.tar.xz frr-4943f243b5cec95fe39374ba2b07f7d6a628a94d.zip |
zebra_ptm: Introduce IS_BFD_ENABLED_PROTOCOL macro
Unify the check if a client supports BFD into one location.
Signed-off-by: Christian Franke <chris@opensourcerouting.org>
Diffstat (limited to 'zebra/zebra_ptm_redistribute.c')
-rw-r--r-- | zebra/zebra_ptm_redistribute.c | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/zebra/zebra_ptm_redistribute.c b/zebra/zebra_ptm_redistribute.c index 815f61d15..420105198 100644 --- a/zebra/zebra_ptm_redistribute.c +++ b/zebra/zebra_ptm_redistribute.c @@ -24,6 +24,7 @@ #include "stream.h" #include "zebra/zserv.h" #include "zebra/zapi_msg.h" +#include "zebra/zebra_ptm.h" #include "zebra/zebra_ptm_redistribute.h" #include "zebra/zebra_memory.h" @@ -76,11 +77,7 @@ void zebra_interface_bfd_update(struct interface *ifp, struct prefix *dp, struct zserv *client; for (ALL_LIST_ELEMENTS(zebrad.client_list, node, nnode, client)) { - /* Supporting for OSPF, BGP and PIM */ - if (client->proto != ZEBRA_ROUTE_OSPF - && client->proto != ZEBRA_ROUTE_BGP - && client->proto != ZEBRA_ROUTE_OSPF6 - && client->proto != ZEBRA_ROUTE_PIM) + if (!IS_BFD_ENABLED_PROTOCOL(client->proto)) continue; /* Notify to the protocol daemons. */ @@ -110,11 +107,7 @@ void zebra_bfd_peer_replay_req(void) struct zserv *client; for (ALL_LIST_ELEMENTS(zebrad.client_list, node, nnode, client)) { - /* Supporting for BGP */ - if ((client->proto != ZEBRA_ROUTE_BGP) - && (client->proto != ZEBRA_ROUTE_OSPF) - && (client->proto != ZEBRA_ROUTE_OSPF6) - && (client->proto != ZEBRA_ROUTE_PIM)) + if (!IS_BFD_ENABLED_PROTOCOL(client->proto)) continue; /* Notify to the protocol daemons. */ |