diff options
Diffstat (limited to 'include/net/ip_vs.h')
-rw-r--r-- | include/net/ip_vs.h | 11 |
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) | |||
904 | return csum_partial((char *) diff, sizeof(diff), oldsum); | 904 | return csum_partial((char *) diff, sizeof(diff), oldsum); |
905 | } | 905 | } |
906 | 906 | ||
907 | #ifdef CONFIG_IP_VS_IPV6 | ||
908 | static inline __wsum ip_vs_check_diff16(const __be32 *old, const __be32 *new, | ||
909 | __wsum oldsum) | ||
910 | { | ||
911 | __be32 diff[8] = { ~old[3], ~old[2], ~old[1], ~old[0], | ||
912 | new[3], new[2], new[1], new[0] }; | ||
913 | |||
914 | return csum_partial((char *) diff, sizeof(diff), oldsum); | ||
915 | } | ||
916 | #endif | ||
917 | |||
907 | static inline __wsum ip_vs_check_diff2(__be16 old, __be16 new, __wsum oldsum) | 918 | static inline __wsum ip_vs_check_diff2(__be16 old, __be16 new, __wsum oldsum) |
908 | { | 919 | { |
909 | __be16 diff[2] = { ~old, new }; | 920 | __be16 diff[2] = { ~old, new }; |