summaryrefslogtreecommitdiffstats
path: root/include/net/ip_vs.h
diff options
context:
space:
mode:
authorJulius Volz2008-09-02 15:55:42 +0200
committerSimon Horman2008-09-05 03:17:07 +0200
commit0bbdd42b7efa66685b6d74701bcde3a596a3a59d (patch)
tree98b1cc6fc7b856768b7923f2747e64c2ccc7878b /include/net/ip_vs.h
parentIPVS: Add protocol debug functions for IPv6 (diff)
downloadkernel-qcow2-linux-0bbdd42b7efa66685b6d74701bcde3a596a3a59d.tar.gz
kernel-qcow2-linux-0bbdd42b7efa66685b6d74701bcde3a596a3a59d.tar.xz
kernel-qcow2-linux-0bbdd42b7efa66685b6d74701bcde3a596a3a59d.zip
IPVS: Extend protocol DNAT/SNAT and state handlers
Extend protocol DNAT/SNAT and state handlers to work with IPv6. Also change/introduce new checksumming helper functions for this. Signed-off-by: Julius Volz <juliusv@google.com> Signed-off-by: Simon Horman <horms@verge.net.au>
Diffstat (limited to 'include/net/ip_vs.h')
-rw-r--r--include/net/ip_vs.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/include/net/ip_vs.h b/include/net/ip_vs.h
index 68f004f9bcc2..c173f1a7de2c 100644
--- a/include/net/ip_vs.h
+++ b/include/net/ip_vs.h
@@ -904,6 +904,17 @@ static inline __wsum ip_vs_check_diff4(__be32 old, __be32 new, __wsum oldsum)
return csum_partial((char *) diff, sizeof(diff), oldsum);
}
+#ifdef CONFIG_IP_VS_IPV6
+static inline __wsum ip_vs_check_diff16(const __be32 *old, const __be32 *new,
+ __wsum oldsum)
+{
+ __be32 diff[8] = { ~old[3], ~old[2], ~old[1], ~old[0],
+ new[3], new[2], new[1], new[0] };
+
+ return csum_partial((char *) diff, sizeof(diff), oldsum);
+}
+#endif
+
static inline __wsum ip_vs_check_diff2(__be16 old, __be16 new, __wsum oldsum)
{
__be16 diff[2] = { ~old, new };