All of lore.kernel.org
 help / color / mirror / Atom feed
* IPv6 multicast snooping behaviour on 2.6.39-rc2 and later
@ 2011-08-23  8:41 Ang Way Chuang
  2011-08-23  9:57 ` Eric Dumazet
  0 siblings, 1 reply; 13+ messages in thread
From: Ang Way Chuang @ 2011-08-23  8:41 UTC (permalink / raw)
  To: netdev

Hi all,

    Sorry for cross-posting. I have a testbed setup on my VM environment that needs to use MLDv2 report message. My PIM router which is connected to a port on the bridge relies upon MLDv2 message to work. However, the setup failed to work after 2.6.39-rc2 or later. MLDv2 won't be forwarded to any slave ports bound to the bridge interface. Specifically, I track the cause down to this commit id:

      ff9a57a62afbbe2d0f3a09af321f1fd7645f38a5

    However, as soon as I disable multicast snooping on sysfs, MLDv2 message can be forwarded again.

    I am not knowledgeable on the subject of multicast snooping, but is this right behaviour for multicast snooping? IPv4 doesn't seem to suffer the same fate though, IGMP can be forwarded even if multicast_snooping is enabled. Thank you in advance.


Regards,
Ang Way Chuang



^ permalink raw reply	[flat|nested] 13+ messages in thread
* [PATCH] bridge: Pseudo-header required for the checksum of ICMP6 header of MLD
@ 2011-08-24  6:10 Ang Way Chuang
  2011-08-24  7:18 ` Eric Dumazet
  0 siblings, 1 reply; 13+ messages in thread
From: Ang Way Chuang @ 2011-08-24  6:10 UTC (permalink / raw)
  To: netdev; +Cc: Eric Dumazet

Just saw Eric's patch for icmp6_type. Suspect this patch may have issue for reference
of ip6h after pskb_trim_rcsum()?

Checksum of ICMPv6 is not properly computed because the pseudo header is not used.
Thus, the MLD packet gets dropped by the bridge. This patch fixes the problem for my
testbed. This bug was made visible by commit ff9a57a62afbbe2d0f3a09af321f1fd7645f38a.

This patch has been tested on 3.0.3. Due to lack of understanding on the checksum
optimization and multicast snooping of the kernel stack, can someone please verify the
correctness of this patch?

Signed-off-by: Ang Way Chuang <wcang@sfc.wide.ad.jp>
---
index 2d85ca7..bbf361b 100644
--- a/net/bridge/br_multicast.c
+++ b/net/bridge/br_multicast.c
@@ -1528,9 +1528,12 @@ static int br_multicast_ipv6_rcv(struct net_bridge *br,
 			break;
 		/*FALLTHROUGH*/
 	case CHECKSUM_NONE:
-		skb2->csum = 0;
-		if (skb_checksum_complete(skb2))
+		if (!skb_csum_unnecessary(skb2) && csum_ipv6_magic(&ip6h->saddr,
+			&ip6h->daddr, skb2->len, IPPROTO_ICMPV6,
+			skb_checksum(skb2, 0, skb2->len, 0))) {
+			err = -EINVAL;
 			goto out;
+		}
 	}
 
 	err = 0;
---

^ permalink raw reply related	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2011-08-24  7:38 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-08-23  8:41 IPv6 multicast snooping behaviour on 2.6.39-rc2 and later Ang Way Chuang
2011-08-23  9:57 ` Eric Dumazet
2011-08-23 12:31   ` Ang Way Chuang
2011-08-23 13:10     ` Eric Dumazet
2011-08-23 14:04       ` Ang Way Chuang
2011-08-23 17:24         ` Ang Way Chuang
2011-08-24  4:56           ` [PATCH] bridge: Pseudo-header required for the checksum of ICMP6 header of MLD Ang Way Chuang
2011-08-24  5:06             ` David Miller
2011-08-24  7:04           ` IPv6 multicast snooping behaviour on 2.6.39-rc2 and later Yan, Zheng 
2011-08-24  7:22             ` Eric Dumazet
2011-08-24  7:38             ` Ang Way Chuang
2011-08-24  6:10 [PATCH] bridge: Pseudo-header required for the checksum of ICMP6 header of MLD Ang Way Chuang
2011-08-24  7:18 ` Eric Dumazet

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.