diff options
| author | Mobashshera Rasool <mrasool@vmware.com> | 2022-09-27 04:49:34 -0700 |
|---|---|---|
| committer | Mobashshera Rasool <mrasool@vmware.com> | 2022-09-27 05:04:24 -0700 |
| commit | a0625bb3568bc226ffc064550262f8a462e59df7 (patch) | |
| tree | ff1cb4479f5fa8c68821701a4b835dcb4efceb4c /pimd/pim_igmp.c | |
| parent | 031561497c01a4abdab455c0b5f582c958e7a9c6 (diff) | |
pimd: IGMP Querier election is not correct in LAN scenario
When more than 2 routers are present in LAN and the querier
goes down, the other routers will wait for other querier
present timer to expire to elect a new querier.
This issue will be seen when the router having next lower ip
address expires the other querier present timer first and it
starts sending the query message. Now on the other non-querier
routers it will receive this query and reset its other
querier present timer but the querier is still the old one
and since it is lowest ip, it never gets updated to the newly
elected querier.
Reset the other querier timer only if query is received from
the previously elected querier or a better new querier
This will make sure that non-querier elects the new querier
whose ip address is higher than the old querier
when the old querier goes down via other querier querier
timer expiry
Issue: #12027
Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
Diffstat (limited to 'pimd/pim_igmp.c')
| -rw-r--r-- | pimd/pim_igmp.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/pimd/pim_igmp.c b/pimd/pim_igmp.c index 57ae15079b..308cba0697 100644 --- a/pimd/pim_igmp.c +++ b/pimd/pim_igmp.c @@ -610,10 +610,17 @@ static int igmp_recv_query(struct gm_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)) + /* Reset the other querier timer only if query is received from + * the previously elected querier or a better new querier + * This will make sure that non-querier elects the new querier + * whose ip address is higher than the old querier + * in case the old querier goes down via other querier present + * timer expiry + */ + 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); + pim_igmp_other_querier_timer_on(igmp); + } } /* IGMP version 3 is the only one where we process the RXed query */ |
