diff options
author | Donald Sharp <sharpd@cumulusnetworks.com> | 2021-07-22 14:33:24 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-22 14:33:24 +0200 |
commit | d5b8e046514f8d178bbd8a7cac8da659cc78478e (patch) | |
tree | 0172837f69329cd2e3b5ff85656a576c231cb09f /pimd/pim_igmp.c | |
parent | Merge pull request #9082 from ton31337/feature/bgp_alias_route-map_match (diff) | |
parent | pimd: To print querierIP address on the querier and nonQuerier IGMP enabled intf (diff) | |
download | frr-d5b8e046514f8d178bbd8a7cac8da659cc78478e.tar.xz frr-d5b8e046514f8d178bbd8a7cac8da659cc78478e.zip |
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 477cf991b..3325b6ee3 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 */ |