ipv4/igmp: fix v1/v2 switchback timeout based on rfc3376, 8.12
Subsystems (3)
PATCH 1/1 ipv4/igmp: fix v1/v2 switchback timeout based on rfc3376, 8.12
Similiar with ipv6 mcast commit 89225d1ce6af3 ("net: ipv6: mld: fix v1/v2 switchback timeout to rfc3810, 9.12.")
i) RFC3376 8.12. Older Version Querier Present Timeout says:
The Older Version Querier Interval is the time-out for transitioning a host back to IGMPv3 mode once an older version query is heard. When an older version query is received, hosts set their Older Version Querier Present Timer to Older Version Querier Interval.
This value MUST be ((the Robustness Variable) times (the Query Interval in the last Query received)) plus (one Query Response Interval).
Currently we only use a hardcode value IGMP_V1/v2_ROUTER_PRESENT_TIMEOUT. Fix it by adding two new items mr_qi(Query Interval) and mr_qri(Query Response Interval) in struct in_device.
Now we can calculate the switchback time via (mr_qrv * mr_qi) + mr_qri. We need update these values when receive IGMPv3 queries.
--- include/linux/inetdevice.h | 4 +++- net/ipv4/igmp.c | 53 +++++++++++++++++++++++++++++++--------------- 2 files changed, 39 insertions(+), 18 deletions(-)
include/linux/inetdevice.h +3 -1
@@ -37,7 +37,9 @@ struct in_device {unsigned long mr_v1_seen;unsigned long mr_v2_seen;unsigned long mr_maxdelay; -unsigned char mr_qrv; +unsigned long mr_qi;/* Query Interval */ +unsigned long mr_qri;/* Query Response Interval */ +unsigned char mr_qrv;/* Query Robustness Variable */ unsigned char mr_gq_running;unsigned char mr_ifc_count;struct timer_list mr_gq_timer;/* general query timer */
net/ipv4/igmp.c +36 -17
103 lines not on this page · raw message
Signature · 1 line
2.5.5
From: Hangbin Liu <[email protected]>
Date: Fri, 26 Oct 2018 11:30:35 +0800
Quoted 18 lines
Similiar with ipv6 mcast commit
89225d1ce6af3("net: ipv6: mld: fix v1/v2 switchback timeout to rfc3810, 9.12.")i) RFC3376 8.12. Older Version Querier Present Timeout says:
The Older Version Querier Interval is the time-out for transitioning a host back to IGMPv3 mode once an older version query is heard. When an older version query is received, hosts set their Older Version Querier Present Timer to Older Version Querier Interval.
This value MUST be ((the Robustness Variable) times (the Query Interval in the last Query received)) plus (one Query Response Interval).
Currently we only use a hardcode value IGMP_V1/v2_ROUTER_PRESENT_TIMEOUT. Fix it by adding two new items
mr_qi(Query Interval)andmr_qri(Query Response Interval)in structin_device.
Quoted 5 lines
Now we can calculate the switchback time via (
mr_qrv*mr_qi) +mr_qri. We need update these values when receive IGMPv3 queries.Reported-by Ying Xu <[email protected]>Signed-off-by Hangbin Liu <[email protected]>
Applied.