diff options
author | Hangbin Liu <liuhangbin@gmail.com> | 2018-06-21 07:49:36 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-06-22 21:27:45 -0400 |
commit | 6c6da92808442908287fae8ebb0ca041a52469f4 (patch) | |
tree | d824de92c95c576c17c2f397a0e318cd76a4fb51 | |
parent | b8f1f65882f07913157c44673af7ec0b308d03eb (diff) |
ipv6: mcast: fix unsolicited report interval after receiving querys
After recieving MLD querys, we update idev->mc_maxdelay with max_delay
from query header. This make the later unsolicited reports have the same
interval with mc_maxdelay, which means we may send unsolicited reports with
long interval time instead of default configured interval time.
Also as we will not call ipv6_mc_reset() after device up. This issue will
be there even after leave the group and join other groups.
Fixes: fc4eba58b4c14 ("ipv6: make unsolicited report intervals configurable for mld")
Signed-off-by: Hangbin Liu <liuhangbin@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | net/ipv6/mcast.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/net/ipv6/mcast.c b/net/ipv6/mcast.c index 975021df7c1c..c0c74088f2af 100644 --- a/net/ipv6/mcast.c +++ b/net/ipv6/mcast.c | |||
@@ -2082,7 +2082,8 @@ void ipv6_mc_dad_complete(struct inet6_dev *idev) | |||
2082 | mld_send_initial_cr(idev); | 2082 | mld_send_initial_cr(idev); |
2083 | idev->mc_dad_count--; | 2083 | idev->mc_dad_count--; |
2084 | if (idev->mc_dad_count) | 2084 | if (idev->mc_dad_count) |
2085 | mld_dad_start_timer(idev, idev->mc_maxdelay); | 2085 | mld_dad_start_timer(idev, |
2086 | unsolicited_report_interval(idev)); | ||
2086 | } | 2087 | } |
2087 | } | 2088 | } |
2088 | 2089 | ||
@@ -2094,7 +2095,8 @@ static void mld_dad_timer_expire(struct timer_list *t) | |||
2094 | if (idev->mc_dad_count) { | 2095 | if (idev->mc_dad_count) { |
2095 | idev->mc_dad_count--; | 2096 | idev->mc_dad_count--; |
2096 | if (idev->mc_dad_count) | 2097 | if (idev->mc_dad_count) |
2097 | mld_dad_start_timer(idev, idev->mc_maxdelay); | 2098 | mld_dad_start_timer(idev, |
2099 | unsolicited_report_interval(idev)); | ||
2098 | } | 2100 | } |
2099 | in6_dev_put(idev); | 2101 | in6_dev_put(idev); |
2100 | } | 2102 | } |
@@ -2452,7 +2454,8 @@ static void mld_ifc_timer_expire(struct timer_list *t) | |||
2452 | if (idev->mc_ifc_count) { | 2454 | if (idev->mc_ifc_count) { |
2453 | idev->mc_ifc_count--; | 2455 | idev->mc_ifc_count--; |
2454 | if (idev->mc_ifc_count) | 2456 | if (idev->mc_ifc_count) |
2455 | mld_ifc_start_timer(idev, idev->mc_maxdelay); | 2457 | mld_ifc_start_timer(idev, |
2458 | unsolicited_report_interval(idev)); | ||
2456 | } | 2459 | } |
2457 | in6_dev_put(idev); | 2460 | in6_dev_put(idev); |
2458 | } | 2461 | } |