All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stephen Hemminger <shemminger@vyatta.com>
To: "Yan, Zheng" <zheng.z.yan@intel.com>
Cc: Martin Volf <martin.volf.42@gmail.com>,
	"bridge@lists.linux-foundation.org"
	<bridge@lists.linux-foundation.org>,
	"wcang@sfc.wide.ad.jp" <wcang@sfc.wide.ad.jp>,
	"davem@davemloft.net" <davem@davemloft.net>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>
Subject: [Bridge] [RFT] bridge: checksum not updated after pull
Date: Tue, 15 Nov 2011 10:09:14 -0800	[thread overview]
Message-ID: <20111115100914.0c9540be@nehalam.linuxnetplumber.net> (raw)
In-Reply-To: <4EC23EE7.2010606@intel.com>

I think this is what is necessary, please test.

Subject: bridge: correct IPv6 checksum after pull

Bridge multicast snooping of ICMPv6 would incorrectly report a checksum problem
when used with Ethernet devices like sky2 that use CHECKSUM_COMPLETE.
When bytes are removed from skb, the computed checksum needs to be adjusted.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>


--- a/net/bridge/br_multicast.c	2011-11-09 13:55:00.028012483 -0800
+++ b/net/bridge/br_multicast.c	2011-11-15 10:05:06.171314194 -0800
@@ -1501,7 +1501,9 @@ static int br_multicast_ipv6_rcv(struct
 
 	__skb_pull(skb2, offset);
 	skb_reset_transport_header(skb2);
-
+	skb_postpull_rcsum(skb2, skb_network_header(skb2),
+			   skb_network_header_len(skb2));
+
 	icmp6_type = icmp6_hdr(skb2)->icmp6_type;
 
 	switch (icmp6_type) {

WARNING: multiple messages have this Message-ID (diff)
From: Stephen Hemminger <shemminger@vyatta.com>
To: "Yan, Zheng" <zheng.z.yan@intel.com>
Cc: Martin Volf <martin.volf.42@gmail.com>,
	"bridge@lists.linux-foundation.org"
	<bridge@lists.linux-foundation.org>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"davem@davemloft.net" <davem@davemloft.net>,
	"wcang@sfc.wide.ad.jp" <wcang@sfc.wide.ad.jp>
Subject: [RFT] bridge: checksum not updated after pull
Date: Tue, 15 Nov 2011 10:09:14 -0800	[thread overview]
Message-ID: <20111115100914.0c9540be@nehalam.linuxnetplumber.net> (raw)
In-Reply-To: <4EC23EE7.2010606@intel.com>

I think this is what is necessary, please test.

Subject: bridge: correct IPv6 checksum after pull

Bridge multicast snooping of ICMPv6 would incorrectly report a checksum problem
when used with Ethernet devices like sky2 that use CHECKSUM_COMPLETE.
When bytes are removed from skb, the computed checksum needs to be adjusted.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>


--- a/net/bridge/br_multicast.c	2011-11-09 13:55:00.028012483 -0800
+++ b/net/bridge/br_multicast.c	2011-11-15 10:05:06.171314194 -0800
@@ -1501,7 +1501,9 @@ static int br_multicast_ipv6_rcv(struct
 
 	__skb_pull(skb2, offset);
 	skb_reset_transport_header(skb2);
-
+	skb_postpull_rcsum(skb2, skb_network_header(skb2),
+			   skb_network_header_len(skb2));
+
 	icmp6_type = icmp6_hdr(skb2)->icmp6_type;
 
 	switch (icmp6_type) {

  parent reply	other threads:[~2011-11-15 18:09 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-15  9:03 [Bridge] sky2 hw csum failure Martin Volf
2011-11-15  9:05 ` Martin Volf
2011-11-15 10:27 ` [Bridge] " Yan, Zheng
2011-11-15 10:28   ` Yan, Zheng
2011-11-15 17:45   ` [Bridge] " Stephen Hemminger
2011-11-15 17:45     ` Stephen Hemminger
2011-11-15 18:09   ` Stephen Hemminger [this message]
2011-11-15 18:09     ` [RFT] bridge: checksum not updated after pull Stephen Hemminger
2011-11-15 19:50     ` [Bridge] " Martin Volf
2011-11-15 19:51       ` Martin Volf
2011-11-16 22:47       ` [Bridge] " David Miller
2011-11-16 22:47         ` David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20111115100914.0c9540be@nehalam.linuxnetplumber.net \
    --to=shemminger@vyatta.com \
    --cc=bridge@lists.linux-foundation.org \
    --cc=davem@davemloft.net \
    --cc=martin.volf.42@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=wcang@sfc.wide.ad.jp \
    --cc=zheng.z.yan@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.