]> git.puffer.fish Git - matthieu/frr.git/commitdiff
pimd: Handling hello send statistics for passive interface
authorsarita patra <saritap@vmware.com>
Mon, 4 Apr 2022 11:14:54 +0000 (04:14 -0700)
committersarita patra <saritap@vmware.com>
Fri, 13 May 2022 06:51:21 +0000 (23:51 -0700)
Increment pim_ifstat_hello_sent only when interface is
passive disabled.

Signed-off-by: sarita patra <saritap@vmware.com>
pimd/pim_pim.c

index e9426c1c95592b187954b3e0ca9b79cbcdf633bf..f0f4a7139b930343321c91cc8ed032fee0e9f895 100644 (file)
@@ -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;
 }