netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] net: fix can_checksum_protocol() arguments swap
@ 2011-01-19 10:51 Eric Dumazet
  2011-01-19 13:33 ` Jesse Gross
  2011-01-19 22:14 ` David Miller
  0 siblings, 2 replies; 4+ messages in thread
From: Eric Dumazet @ 2011-01-19 10:51 UTC (permalink / raw)
  To: David Miller; +Cc: netdev, Jesse Gross, Hans de Bruin

commit 0363466866d901fbc (net offloading: Convert checksums to use
centrally computed features.) mistakenly swapped can_checksum_protocol()
arguments.

This broke IPv6 on bnx2 for instance, on NIC without TCPv6 checksum
offloads.

Reported-by: Hans de Bruin <jmdebruin@xmsnet.nl>
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
CC: Jesse Gross <jesse@nicira.com>
---
I cant believe I spent so much time on this bug.

 net/core/dev.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/core/dev.c b/net/core/dev.c
index 54277df..cff6d9b 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -2001,7 +2001,7 @@ static bool can_checksum_protocol(unsigned long features, __be16 protocol)
 
 static int harmonize_features(struct sk_buff *skb, __be16 protocol, int features)
 {
-	if (!can_checksum_protocol(protocol, features)) {
+	if (!can_checksum_protocol(features, protocol)) {
 		features &= ~NETIF_F_ALL_CSUM;
 		features &= ~NETIF_F_SG;
 	} else if (illegal_highdma(skb->dev, skb)) {



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

end of thread, other threads:[~2011-01-19 22:14 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-01-19 10:51 [PATCH] net: fix can_checksum_protocol() arguments swap Eric Dumazet
2011-01-19 13:33 ` Jesse Gross
2011-01-19 15:01   ` Hans de Bruin
2011-01-19 22:14 ` David 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).