Skip to content

Commit 00897fe

Browse files
Daniel Borkmanngregkh
authored andcommitted
net: bridge: convert MLDv2 Query MRC into msecs_to_jiffies for max_delay
[ Upstream commit 2d98c29 ] While looking into MLDv1/v2 code, I noticed that bridging code does not convert it's max delay into jiffies for MLDv2 messages as we do in core IPv6' multicast code. RFC3810, 5.1.3. Maximum Response Code says: The Maximum Response Code field specifies the maximum time allowed before sending a responding Report. The actual time allowed, called the Maximum Response Delay, is represented in units of milliseconds, and is derived from the Maximum Response Code as follows: [...] As we update timers that work with jiffies, we need to convert it. Signed-off-by: Daniel Borkmann <dborkman@redhat.com> Cc: Linus Lüssing <linus.luessing@web.de> Cc: Hannes Frederic Sowa <hannes@stressinduktion.org> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 56a12ac commit 00897fe

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

‎net/bridge/br_multicast.c‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1193,7 +1193,8 @@ static int br_ip6_multicast_query(struct net_bridge *br,
11931193
mld2q = (struct mld2_query *)icmp6_hdr(skb);
11941194
if (!mld2q->mld2q_nsrcs)
11951195
group = &mld2q->mld2q_mca;
1196-
max_delay = mld2q->mld2q_mrc ? MLDV2_MRC(ntohs(mld2q->mld2q_mrc)) : 1;
1196+
1197+
max_delay = max(msecs_to_jiffies(MLDV2_MRC(ntohs(mld2q->mld2q_mrc))), 1UL);
11971198
}
11981199

11991200
if (!group)

0 commit comments

Comments
 (0)