summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bgpd/bgp_io.c2
-rw-r--r--pimd/pim_iface.c13
-rw-r--r--zebra/zserv.c23
3 files changed, 15 insertions, 23 deletions
diff --git a/bgpd/bgp_io.c b/bgpd/bgp_io.c
index 650adc1c9a..e9178fd8fc 100644
--- a/bgpd/bgp_io.c
+++ b/bgpd/bgp_io.c
@@ -225,7 +225,7 @@ static void bgp_process_reads(struct event *thread)
peer = EVENT_ARG(thread);
- if (peer->fd < 0 || bm->terminating)
+ if (bm->terminating || peer->fd < 0)
return;
struct frr_pthread *fpt = bgp_pth_io;
diff --git a/pimd/pim_iface.c b/pimd/pim_iface.c
index f26fd818b5..7340eeaa60 100644
--- a/pimd/pim_iface.c
+++ b/pimd/pim_iface.c
@@ -40,9 +40,8 @@
#include "pim6_mld.h"
-#if PIM_IPV == 4
-static void pim_if_igmp_join_del_all(struct interface *ifp);
-#endif
+static void pim_if_gm_join_del_all(struct interface *ifp);
+
static int gm_join_sock(const char *ifname, ifindex_t ifindex,
pim_addr group_addr, pim_addr source_addr,
struct pim_interface *pim_ifp);
@@ -189,11 +188,9 @@ void pim_if_delete(struct interface *ifp)
assert(pim_ifp);
pim_ifp->pim->mcast_if_count--;
-#if PIM_IPV == 4
if (pim_ifp->gm_join_list) {
- pim_if_igmp_join_del_all(ifp);
+ pim_if_gm_join_del_all(ifp);
}
-#endif
pim_ifchannel_delete_all(ifp);
#if PIM_IPV == 4
@@ -1380,9 +1377,8 @@ int pim_if_gm_join_del(struct interface *ifp, pim_addr group_addr,
return 0;
}
-#if PIM_IPV == 4
__attribute__((unused))
-static void pim_if_igmp_join_del_all(struct interface *ifp)
+static void pim_if_gm_join_del_all(struct interface *ifp)
{
struct pim_interface *pim_ifp;
struct listnode *node;
@@ -1402,7 +1398,6 @@ static void pim_if_igmp_join_del_all(struct interface *ifp)
for (ALL_LIST_ELEMENTS(pim_ifp->gm_join_list, node, nextnode, ij))
pim_if_gm_join_del(ifp, ij->group_addr, ij->source_addr);
}
-#endif /* PIM_IPV == 4 */
/*
RFC 4601
diff --git a/zebra/zserv.c b/zebra/zserv.c
index 85e1edeca0..00a78140e3 100644
--- a/zebra/zserv.c
+++ b/zebra/zserv.c
@@ -582,30 +582,27 @@ static void zserv_client_free(struct zserv *client)
/* Close file descriptor. */
if (client->sock) {
- unsigned long nroutes;
- unsigned long nnhgs;
+ unsigned long nroutes = 0;
+ unsigned long nnhgs = 0;
close(client->sock);
- /* If this is a synchronous BGP Zebra client for label/table
- * manager, then ignore it. It's not GR-aware, and causes GR to
- * be skipped for the session_id == 0 (asynchronous).
- */
- if (client->proto == ZEBRA_ROUTE_BGP && client->session_id == 1)
- return;
-
if (DYNAMIC_CLIENT_GR_DISABLED(client)) {
- zebra_mpls_client_cleanup_vrf_label(client->proto);
+ if (!client->synchronous) {
+ zebra_mpls_client_cleanup_vrf_label(
+ client->proto);
- nroutes = rib_score_proto(client->proto,
- client->instance);
+ nroutes = rib_score_proto(client->proto,
+ client->instance);
+ }
zlog_notice(
"client %d disconnected %lu %s routes removed from the rib",
client->sock, nroutes,
zebra_route_string(client->proto));
/* Not worrying about instance for now */
- nnhgs = zebra_nhg_score_proto(client->proto);
+ if (!client->synchronous)
+ nnhgs = zebra_nhg_score_proto(client->proto);
zlog_notice(
"client %d disconnected %lu %s nhgs removed from the rib",
client->sock, nnhgs,