datapath: Transport port is not part of psuedoheader.
authorJesse Gross <jesse@nicira.com>
Mon, 25 Jan 2010 00:57:54 +0000 (19:57 -0500)
committerJesse Gross <jesse@nicira.com>
Tue, 26 Jan 2010 22:18:24 +0000 (17:18 -0500)
While updating the checksum after changing the transport port,
we indicated that this was a change to the psuedoheader.  Since
this is not the case, it could produce an incorrect checksum.

datapath/actions.c

index a24abca..53bf3ef 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Distributed under the terms of the GNU GPL version 2.
- * Copyright (c) 2007, 2008, 2009 Nicira Networks.
+ * Copyright (c) 2007, 2008, 2009, 2010 Nicira Networks.
  *
  * Significant portions of this file may be copied from parts of the Linux
  * kernel, by Linus Torvalds and others.
@@ -276,7 +276,7 @@ set_tp_port(struct sk_buff *skb, struct odp_flow_key *key,
                u16 old = *f;
                u16 new = a->tp_port;
                update_csum((u16*)(skb_transport_header(skb) + check_ofs), 
-                               skb, old, new, 1);
+                               skb, old, new, 0);
                *f = new;
        }
        return skb;