summaryrefslogtreecommitdiffstats
path: root/pimd/pim_pim.c
diff options
context:
space:
mode:
authorsarita patra <saritap@vmware.com>2022-04-04 13:14:54 +0200
committersarita patra <saritap@vmware.com>2022-05-13 08:51:21 +0200
commit11e771be6166a23d2eacace88ade19c659c671fd (patch)
tree9b06aed990519504cd8bdbceb61a3bcc7cca33d4 /pimd/pim_pim.c
parentpimd: Handling reg and reg_stop send statistics for passive interface (diff)
downloadfrr-11e771be6166a23d2eacace88ade19c659c671fd.tar.xz
frr-11e771be6166a23d2eacace88ade19c659c671fd.zip
pimd: Handling hello send statistics for passive interface
Increment pim_ifstat_hello_sent only when interface is passive disabled. Signed-off-by: sarita patra <saritap@vmware.com>
Diffstat (limited to 'pimd/pim_pim.c')
-rw-r--r--pimd/pim_pim.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/pimd/pim_pim.c b/pimd/pim_pim.c
index e9426c1c9..f0f4a7139 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;
}