aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/ip_vs.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/net/ip_vs.h')
-rw-r--r--include/net/ip_vs.h17
1 files changed, 7 insertions, 10 deletions
diff --git a/include/net/ip_vs.h b/include/net/ip_vs.h
index fe9fcf73c85e..ab9b003ab671 100644
--- a/include/net/ip_vs.h
+++ b/include/net/ip_vs.h
@@ -87,12 +87,12 @@ static inline const char *ip_vs_dbg_addr(int af, char *buf, size_t buf_len,
87 int len; 87 int len;
88#ifdef CONFIG_IP_VS_IPV6 88#ifdef CONFIG_IP_VS_IPV6
89 if (af == AF_INET6) 89 if (af == AF_INET6)
90 len = snprintf(&buf[*idx], buf_len - *idx, "[" NIP6_FMT "]", 90 len = snprintf(&buf[*idx], buf_len - *idx, "[%pI6]",
91 NIP6(addr->in6)) + 1; 91 &addr->in6) + 1;
92 else 92 else
93#endif 93#endif
94 len = snprintf(&buf[*idx], buf_len - *idx, NIPQUAD_FMT, 94 len = snprintf(&buf[*idx], buf_len - *idx, "%pI4",
95 NIPQUAD(addr->ip)) + 1; 95 &addr->ip) + 1;
96 96
97 *idx += len; 97 *idx += len;
98 BUG_ON(*idx > buf_len + 1); 98 BUG_ON(*idx > buf_len + 1);
@@ -503,9 +503,6 @@ struct ip_vs_scheduler {
503 char *name; /* scheduler name */ 503 char *name; /* scheduler name */
504 atomic_t refcnt; /* reference counter */ 504 atomic_t refcnt; /* reference counter */
505 struct module *module; /* THIS_MODULE/NULL */ 505 struct module *module; /* THIS_MODULE/NULL */
506#ifdef CONFIG_IP_VS_IPV6
507 int supports_ipv6; /* scheduler has IPv6 support */
508#endif
509 506
510 /* scheduler initializing service */ 507 /* scheduler initializing service */
511 int (*init_service)(struct ip_vs_service *svc); 508 int (*init_service)(struct ip_vs_service *svc);
@@ -916,7 +913,7 @@ static inline __wsum ip_vs_check_diff4(__be32 old, __be32 new, __wsum oldsum)
916{ 913{
917 __be32 diff[2] = { ~old, new }; 914 __be32 diff[2] = { ~old, new };
918 915
919 return csum_partial((char *) diff, sizeof(diff), oldsum); 916 return csum_partial(diff, sizeof(diff), oldsum);
920} 917}
921 918
922#ifdef CONFIG_IP_VS_IPV6 919#ifdef CONFIG_IP_VS_IPV6
@@ -926,7 +923,7 @@ static inline __wsum ip_vs_check_diff16(const __be32 *old, const __be32 *new,
926 __be32 diff[8] = { ~old[3], ~old[2], ~old[1], ~old[0], 923 __be32 diff[8] = { ~old[3], ~old[2], ~old[1], ~old[0],
927 new[3], new[2], new[1], new[0] }; 924 new[3], new[2], new[1], new[0] };
928 925
929 return csum_partial((char *) diff, sizeof(diff), oldsum); 926 return csum_partial(diff, sizeof(diff), oldsum);
930} 927}
931#endif 928#endif
932 929
@@ -934,7 +931,7 @@ static inline __wsum ip_vs_check_diff2(__be16 old, __be16 new, __wsum oldsum)
934{ 931{
935 __be16 diff[2] = { ~old, new }; 932 __be16 diff[2] = { ~old, new };
936 933
937 return csum_partial((char *) diff, sizeof(diff), oldsum); 934 return csum_partial(diff, sizeof(diff), oldsum);
938} 935}
939 936
940#endif /* __KERNEL__ */ 937#endif /* __KERNEL__ */