Patchwork [RFT] bridge: checksum not updated after pull

login
register
mail settings
Submitter stephen hemminger
Date Nov. 15, 2011, 6:09 p.m.
Message ID <20111115100914.0c9540be@nehalam.linuxnetplumber.net>
Download mbox | patch
Permalink /patch/125852/
State Accepted
Delegated to: David Miller
Headers show

Comments

stephen hemminger - Nov. 15, 2011, 6:09 p.m.
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>


--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Martin Volf - Nov. 15, 2011, 7:51 p.m.
On 15 November 2011 19:09, Stephen Hemminger <shemminger@vyatta.com> wrote:
> I think this is what is necessary, please test.
...

Hello,

with the patch on top of 3.1.1 I no longer get the "hw csum failure"
message. I don't know how to test IPv6 multicast, but IPv6 ND and
SLAAC is correctly passing through the bridge.

Thanks!

Martin Volf
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
David Miller - Nov. 16, 2011, 10:47 p.m.
From: Martin Volf <martin.volf.42@gmail.com>
Date: Tue, 15 Nov 2011 20:51:44 +0100

> On 15 November 2011 19:09, Stephen Hemminger <shemminger@vyatta.com> wrote:
>> I think this is what is necessary, please test.
> ...
> 
> Hello,
> 
> with the patch on top of 3.1.1 I no longer get the "hw csum failure"
> message. I don't know how to test IPv6 multicast, but IPv6 ND and
> SLAAC is correctly passing through the bridge.

Applied, thanks Stephen.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Patch

--- 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) {