datapath: Fix csum_replace4() compatibility implementation.
authorBen Pfaff <blp@nicira.com>
Fri, 10 Dec 2010 22:13:17 +0000 (14:13 -0800)
committerBen Pfaff <blp@nicira.com>
Mon, 13 Dec 2010 18:20:09 +0000 (10:20 -0800)
Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Jesse Gross <jesse@nicira.com>
datapath/linux-2.6/compat-2.6/include/net/checksum.h

index c2ffb341abd110ae72f2f715558f3bff3d67f7d5..e7e7966c2dca8f2a528b20d740b3cdfedf9800ce 100644 (file)
@@ -23,7 +23,7 @@ static inline void csum_replace4(__sum16 *sum, __be32 from, __be32 to)
 {
        __be32 diff[] = { ~from, to };
 
-       sum = csum_fold(csum_partial((char *)diff, sizeof(diff), ~csum_unfold(*sum)));
+       *sum = csum_fold(csum_partial((char *)diff, sizeof(diff), ~csum_unfold(*sum)));
 }
 
 #define inet_proto_csum_replace2(sum, skb, from, to, pseudohdr) \