From 11e771be6166a23d2eacace88ade19c659c671fd Mon Sep 17 00:00:00 2001 From: sarita patra Date: Mon, 4 Apr 2022 04:14:54 -0700 Subject: [PATCH] pimd: Handling hello send statistics for passive interface Increment pim_ifstat_hello_sent only when interface is passive disabled. Signed-off-by: sarita patra --- pimd/pim_pim.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/pimd/pim_pim.c b/pimd/pim_pim.c index e9426c1c95..f0f4a7139b 100644 --- a/pimd/pim_pim.c +++ b/pimd/pim_pim.c @@ -737,7 +737,7 @@ static int hello_send(struct interface *ifp, uint16_t holdtime) if (pim_msg_send(pim_ifp->pim_sock_fd, pim_ifp->primary_address, qpim_all_pim_routers_addr, pim_msg, pim_msg_size, - ifp->name)) { + ifp)) { if (PIM_DEBUG_PIM_HELLO) { zlog_debug( "%s: could not send PIM message on interface %s", @@ -766,8 +766,10 @@ int pim_hello_send(struct interface *ifp, uint16_t holdtime) return -1; } - ++pim_ifp->pim_ifstat_hello_sent; - PIM_IF_FLAG_SET_HELLO_SENT(pim_ifp->flags); + if (!pim_ifp->pim_passive_enable) { + ++pim_ifp->pim_ifstat_hello_sent; + PIM_IF_FLAG_SET_HELLO_SENT(pim_ifp->flags); + } return 0; } -- 2.39.5