Commit b52494f5 authored by Hangbin Liu's avatar Hangbin Liu Committed by Kleber Sacilotto de Souza

ipv6: mcast: fix unsolicited report interval after receiving querys

BugLink: https://bugs.launchpad.net/bugs/1792377

[ Upstream commit 6c6da928 ]

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: fc4eba58 ("ipv6: make unsolicited report intervals configurable for mld")
Signed-off-by: default avatarHangbin Liu <liuhangbin@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
Signed-off-by: default avatarSasha Levin <alexander.levin@microsoft.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarStefan Bader <stefan.bader@canonical.com>
Signed-off-by: default avatarKleber Sacilotto de Souza <kleber.souza@canonical.com>
parent 5db071a6
...@@ -2061,7 +2061,8 @@ void ipv6_mc_dad_complete(struct inet6_dev *idev) ...@@ -2061,7 +2061,8 @@ void ipv6_mc_dad_complete(struct inet6_dev *idev)
mld_send_initial_cr(idev); mld_send_initial_cr(idev);
idev->mc_dad_count--; idev->mc_dad_count--;
if (idev->mc_dad_count) if (idev->mc_dad_count)
mld_dad_start_timer(idev, idev->mc_maxdelay); mld_dad_start_timer(idev,
unsolicited_report_interval(idev));
} }
} }
...@@ -2073,7 +2074,8 @@ static void mld_dad_timer_expire(unsigned long data) ...@@ -2073,7 +2074,8 @@ static void mld_dad_timer_expire(unsigned long data)
if (idev->mc_dad_count) { if (idev->mc_dad_count) {
idev->mc_dad_count--; idev->mc_dad_count--;
if (idev->mc_dad_count) if (idev->mc_dad_count)
mld_dad_start_timer(idev, idev->mc_maxdelay); mld_dad_start_timer(idev,
unsolicited_report_interval(idev));
} }
in6_dev_put(idev); in6_dev_put(idev);
} }
...@@ -2431,7 +2433,8 @@ static void mld_ifc_timer_expire(unsigned long data) ...@@ -2431,7 +2433,8 @@ static void mld_ifc_timer_expire(unsigned long data)
if (idev->mc_ifc_count) { if (idev->mc_ifc_count) {
idev->mc_ifc_count--; idev->mc_ifc_count--;
if (idev->mc_ifc_count) if (idev->mc_ifc_count)
mld_ifc_start_timer(idev, idev->mc_maxdelay); mld_ifc_start_timer(idev,
unsolicited_report_interval(idev));
} }
in6_dev_put(idev); in6_dev_put(idev);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment