clat ebpf code - use the more correct checksum summation type
Note that per kernel's //include/uapi/linux/types.h:
typedef __u32 __bitwise __wsum;
so this is effectively a no-op.
Test: builds, booted/tested on a blueline on an ipv6-only network
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I8b10bb9ecd714bc18ed475cdb82dcbad50bcb25f
diff --git a/bpf_progs/clatd.c b/bpf_progs/clatd.c
index fb7acfa..1ef91e8 100644
--- a/bpf_progs/clatd.c
+++ b/bpf_progs/clatd.c
@@ -104,7 +104,7 @@
};
// Calculate the IPv4 one's complement checksum of the IPv4 header.
- __u32 sum = 0;
+ __wsum sum = 0;
for (int i = 0; i < sizeof(ip) / sizeof(__u16); ++i) {
sum += ((__u16*)&ip)[i];
}