diff options
| author | Donald Sharp <sharpd@cumulusnetworks.com> | 2021-07-22 08:33:24 -0400 | 
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-07-22 08:33:24 -0400 | 
| commit | d5b8e046514f8d178bbd8a7cac8da659cc78478e (patch) | |
| tree | 0172837f69329cd2e3b5ff85656a576c231cb09f /pimd/pim_igmp.c | |
| parent | 0775caa958c89f27617745b8bae725bcae10224e (diff) | |
| parent | 9a7cee267329da1914c7f7efe1c450e78c28a9d7 (diff) | |
Merge pull request #8986 from mobash-rasool/pim-upst-2
pimd: To print querierIP address on the querier and nonQuerier IGMP e…
Diffstat (limited to 'pimd/pim_igmp.c')
| -rw-r--r-- | pimd/pim_igmp.c | 5 | 
1 files changed, 5 insertions, 0 deletions
diff --git a/pimd/pim_igmp.c b/pimd/pim_igmp.c index 477cf991b4..3325b6ee34 100644 --- a/pimd/pim_igmp.c +++ b/pimd/pim_igmp.c @@ -167,6 +167,8 @@ static int pim_igmp_other_querier_expire(struct thread *t)  			       sizeof(ifaddr_str));  		zlog_debug("%s: Querier %s resuming", __func__, ifaddr_str);  	} +	/* Mark the interface address as querier address */ +	igmp->querier_addr = igmp->ifaddr;  	/*  	  We are the current querier, then @@ -397,6 +399,8 @@ static int igmp_recv_query(struct igmp_sock *igmp, int query_version,  				ntohl(igmp->ifaddr.s_addr), from_str,  				ntohl(from.s_addr));  		} +		if (ntohl(from.s_addr) < ntohl(igmp->querier_addr.s_addr)) +			igmp->querier_addr.s_addr = from.s_addr;  		pim_igmp_other_querier_timer_on(igmp);  	} @@ -969,6 +973,7 @@ static struct igmp_sock *igmp_sock_new(int fd, struct in_addr ifaddr,  	igmp->fd = fd;  	igmp->interface = ifp;  	igmp->ifaddr = ifaddr; +	igmp->querier_addr = ifaddr;  	igmp->t_igmp_read = NULL;  	igmp->t_igmp_query_timer = NULL;  	igmp->t_other_querier_timer = NULL; /* no other querier present */  | 
