diff options
| author | sarita patra <saritap@vmware.com> | 2022-04-04 04:14:54 -0700 | 
|---|---|---|
| committer | sarita patra <saritap@vmware.com> | 2022-05-12 23:51:21 -0700 | 
| commit | 11e771be6166a23d2eacace88ade19c659c671fd (patch) | |
| tree | 9b06aed990519504cd8bdbceb61a3bcc7cca33d4 /pimd/pim_pim.c | |
| parent | 6dd493b80beb3703ffd5605afb0fa113bf4875c3 (diff) | |
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.c | 8 | 
1 files 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;  }  | 
