From: Ben Pfaff Date: Fri, 10 Dec 2010 22:13:17 +0000 (-0800) Subject: datapath: Fix csum_replace4() compatibility implementation. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3f2dd2b10b6f8473fc9ba0637c955d13e2e35a38;p=openvswitch datapath: Fix csum_replace4() compatibility implementation. Signed-off-by: Ben Pfaff Acked-by: Jesse Gross --- diff --git a/datapath/linux-2.6/compat-2.6/include/net/checksum.h b/datapath/linux-2.6/compat-2.6/include/net/checksum.h index c2ffb341..e7e7966c 100644 --- a/datapath/linux-2.6/compat-2.6/include/net/checksum.h +++ b/datapath/linux-2.6/compat-2.6/include/net/checksum.h @@ -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) \