diff options
author | github login name <ranjany@vmware.com> | 2021-07-05 18:24:19 +0200 |
---|---|---|
committer | github login name <ranjany@vmware.com> | 2021-07-06 09:14:28 +0200 |
commit | 9a7cee267329da1914c7f7efe1c450e78c28a9d7 (patch) | |
tree | 7ecc33978952f0ddf7531ed8725c0e046098ebb2 /pimd/pim_igmp.c | |
parent | Merge pull request #8979 from opensourcerouting/msdp-topotest-speedup (diff) | |
download | frr-9a7cee267329da1914c7f7efe1c450e78c28a9d7.tar.xz frr-9a7cee267329da1914c7f7efe1c450e78c28a9d7.zip |
pimd: To print querierIP address on the querier and nonQuerier IGMP enabled intf
1. Add the querierIP object to igmp_sock datastruct to save the IP address of the querier.
Management of the querierIP object is added.
2. To show the querier IP address in the CLI "show ip igmp interface".
3. To add the json object querierIP for querier IP address in the json CLI "show ip igmp interface json".
Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
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 73dcdbddb..d09d67ab0 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); } @@ -935,6 +939,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 */ |