* MLDv2 MRC timer wrong units [PATCH]
@ 2003-11-19 1:19 David Stevens
2003-11-19 1:47 ` David S. Miller
0 siblings, 1 reply; 2+ messages in thread
From: David Stevens @ 2003-11-19 1:19 UTC (permalink / raw)
To: davem, netdev
[-- Attachment #1: Type: text/plain, Size: 1083 bytes --]
The MLD max response code is computing in units of 1/10th second,
as in IGMPv3, but for MLD, it should be in milliseconds. Patch below.
+-DLS
--- linux-2.6.0-test9-bk12/net/ipv6/mcast.c 2003-11-07 14:13:21.000000000 -0800
+++ linux-2.6.0-test9-bk12F1/net/ipv6/mcast.c 2003-11-18 16:55:07.801413776 -0800
@@ -1040,7 +1040,7 @@
/* MLDv1 router present */
/* Translate milliseconds to jiffies */
- max_delay = ntohs(hdr->icmp6_maxdelay)*(HZ/10);
+ max_delay = (ntohs(hdr->icmp6_maxdelay)*HZ)/1000;
switchback = (idev->mc_qrv + 1) * max_delay;
idev->mc_v1_seen = jiffies + switchback;
@@ -1052,7 +1052,7 @@
/* clear deleted report items */
mld_clear_delrec(idev);
} else if (len >= 28) {
- max_delay = MLDV2_MRC(ntohs(mlh2->mrc))*(HZ/10);
+ max_delay = (MLDV2_MRC(ntohs(mlh2->mrc))*HZ)/1000;
if (!max_delay)
max_delay = 1;
idev->mc_maxdelay = max_delay;
(See attached file: mld2fix.patch)
[-- Attachment #2: mld2fix.patch --]
[-- Type: application/octet-stream, Size: 746 bytes --]
--- linux-2.6.0-test9-bk12/net/ipv6/mcast.c 2003-11-07 14:13:21.000000000 -0800
+++ linux-2.6.0-test9-bk12F1/net/ipv6/mcast.c 2003-11-18 16:55:07.801413776 -0800
@@ -1040,7 +1040,7 @@
/* MLDv1 router present */
/* Translate milliseconds to jiffies */
- max_delay = ntohs(hdr->icmp6_maxdelay)*(HZ/10);
+ max_delay = (ntohs(hdr->icmp6_maxdelay)*HZ)/1000;
switchback = (idev->mc_qrv + 1) * max_delay;
idev->mc_v1_seen = jiffies + switchback;
@@ -1052,7 +1052,7 @@
/* clear deleted report items */
mld_clear_delrec(idev);
} else if (len >= 28) {
- max_delay = MLDV2_MRC(ntohs(mlh2->mrc))*(HZ/10);
+ max_delay = (MLDV2_MRC(ntohs(mlh2->mrc))*HZ)/1000;
if (!max_delay)
max_delay = 1;
idev->mc_maxdelay = max_delay;
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: MLDv2 MRC timer wrong units [PATCH]
2003-11-19 1:19 MLDv2 MRC timer wrong units [PATCH] David Stevens
@ 2003-11-19 1:47 ` David S. Miller
0 siblings, 0 replies; 2+ messages in thread
From: David S. Miller @ 2003-11-19 1:47 UTC (permalink / raw)
To: David Stevens; +Cc: netdev
On Tue, 18 Nov 2003 18:19:20 -0700
David Stevens <dlstevens@us.ibm.com> wrote:
> The MLD max response code is computing in units of 1/10th second,
> as in IGMPv3, but for MLD, it should be in milliseconds. Patch below.
I will apply this, thanks David.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2003-11-19 1:47 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-11-19 1:19 MLDv2 MRC timer wrong units [PATCH] David Stevens
2003-11-19 1:47 ` David S. Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).