diff options
| author | Harvey Harrison <harvey.harrison@gmail.com> | 2008-11-07 02:09:56 -0500 |
|---|---|---|
| committer | David S. Miller <davem@davemloft.net> | 2008-11-07 02:09:56 -0500 |
| commit | ca62059b7ec7267d1d2cab0791d3ed6d033e0583 (patch) | |
| tree | 9a469491845d92262c3c659596c810ebcf95918a /net/netfilter | |
| parent | 76acfdb9b78acf73023307974f6d38a269e9967a (diff) | |
ipvs: oldlen, newlen should be be16, not be32
Noticed by sparse:
net/netfilter/ipvs/ip_vs_proto_tcp.c:195:6: warning: incorrect type in argument 5 (different base types)
net/netfilter/ipvs/ip_vs_proto_tcp.c:195:6: expected restricted __be16 [usertype] oldlen
net/netfilter/ipvs/ip_vs_proto_tcp.c:195:6: got restricted __be32 [usertype] <noident>
net/netfilter/ipvs/ip_vs_proto_tcp.c:196:6: warning: incorrect type in argument 6 (different base types)
net/netfilter/ipvs/ip_vs_proto_tcp.c:196:6: expected restricted __be16 [usertype] newlen
net/netfilter/ipvs/ip_vs_proto_tcp.c:196:6: got restricted __be32 [usertype] <noident>
net/netfilter/ipvs/ip_vs_proto_tcp.c:270:6: warning: incorrect type in argument 5 (different base types)
net/netfilter/ipvs/ip_vs_proto_tcp.c:270:6: expected restricted __be16 [usertype] oldlen
net/netfilter/ipvs/ip_vs_proto_tcp.c:270:6: got restricted __be32 [usertype] <noident>
net/netfilter/ipvs/ip_vs_proto_tcp.c:271:6: warning: incorrect type in argument 6 (different base types)
net/netfilter/ipvs/ip_vs_proto_tcp.c:271:6: expected restricted __be16 [usertype] newlen
net/netfilter/ipvs/ip_vs_proto_tcp.c:271:6: got restricted __be32 [usertype] <noident>
net/netfilter/ipvs/ip_vs_proto_udp.c:206:6: warning: incorrect type in argument 5 (different base types)
net/netfilter/ipvs/ip_vs_proto_udp.c:206:6: expected restricted __be16 [usertype] oldlen
net/netfilter/ipvs/ip_vs_proto_udp.c:206:6: got restricted __be32 [usertype] <noident>
net/netfilter/ipvs/ip_vs_proto_udp.c:207:6: warning: incorrect type in argument 6 (different base types)
net/netfilter/ipvs/ip_vs_proto_udp.c:207:6: expected restricted __be16 [usertype] newlen
net/netfilter/ipvs/ip_vs_proto_udp.c:207:6: got restricted __be32 [usertype] <noident>
net/netfilter/ipvs/ip_vs_proto_udp.c:282:6: warning: incorrect type in argument 5 (different base types)
net/netfilter/ipvs/ip_vs_proto_udp.c:282:6: expected restricted __be16 [usertype] oldlen
net/netfilter/ipvs/ip_vs_proto_udp.c:282:6: got restricted __be32 [usertype] <noident>
net/netfilter/ipvs/ip_vs_proto_udp.c:283:6: warning: incorrect type in argument 6 (different base types)
net/netfilter/ipvs/ip_vs_proto_udp.c:283:6: expected restricted __be16 [usertype] newlen
net/netfilter/ipvs/ip_vs_proto_udp.c:283:6: got restricted __be32 [usertype] <noident>
Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Acked-by: Simon Horman <horms@verge.net.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/netfilter')
| -rw-r--r-- | net/netfilter/ipvs/ip_vs_proto_tcp.c | 8 | ||||
| -rw-r--r-- | net/netfilter/ipvs/ip_vs_proto_udp.c | 8 |
2 files changed, 8 insertions, 8 deletions
diff --git a/net/netfilter/ipvs/ip_vs_proto_tcp.c b/net/netfilter/ipvs/ip_vs_proto_tcp.c index dd4566ea2bff..8cba41802850 100644 --- a/net/netfilter/ipvs/ip_vs_proto_tcp.c +++ b/net/netfilter/ipvs/ip_vs_proto_tcp.c | |||
| @@ -192,8 +192,8 @@ tcp_snat_handler(struct sk_buff *skb, | |||
| 192 | /* Adjust TCP checksums */ | 192 | /* Adjust TCP checksums */ |
| 193 | if (skb->ip_summed == CHECKSUM_PARTIAL) { | 193 | if (skb->ip_summed == CHECKSUM_PARTIAL) { |
| 194 | tcp_partial_csum_update(cp->af, tcph, &cp->daddr, &cp->vaddr, | 194 | tcp_partial_csum_update(cp->af, tcph, &cp->daddr, &cp->vaddr, |
| 195 | htonl(oldlen), | 195 | htons(oldlen), |
| 196 | htonl(skb->len - tcphoff)); | 196 | htons(skb->len - tcphoff)); |
| 197 | } else if (!cp->app) { | 197 | } else if (!cp->app) { |
| 198 | /* Only port and addr are changed, do fast csum update */ | 198 | /* Only port and addr are changed, do fast csum update */ |
| 199 | tcp_fast_csum_update(cp->af, tcph, &cp->daddr, &cp->vaddr, | 199 | tcp_fast_csum_update(cp->af, tcph, &cp->daddr, &cp->vaddr, |
| @@ -267,8 +267,8 @@ tcp_dnat_handler(struct sk_buff *skb, | |||
| 267 | */ | 267 | */ |
| 268 | if (skb->ip_summed == CHECKSUM_PARTIAL) { | 268 | if (skb->ip_summed == CHECKSUM_PARTIAL) { |
| 269 | tcp_partial_csum_update(cp->af, tcph, &cp->daddr, &cp->vaddr, | 269 | tcp_partial_csum_update(cp->af, tcph, &cp->daddr, &cp->vaddr, |
| 270 | htonl(oldlen), | 270 | htons(oldlen), |
| 271 | htonl(skb->len - tcphoff)); | 271 | htons(skb->len - tcphoff)); |
| 272 | } else if (!cp->app) { | 272 | } else if (!cp->app) { |
| 273 | /* Only port and addr are changed, do fast csum update */ | 273 | /* Only port and addr are changed, do fast csum update */ |
| 274 | tcp_fast_csum_update(cp->af, tcph, &cp->vaddr, &cp->daddr, | 274 | tcp_fast_csum_update(cp->af, tcph, &cp->vaddr, &cp->daddr, |
diff --git a/net/netfilter/ipvs/ip_vs_proto_udp.c b/net/netfilter/ipvs/ip_vs_proto_udp.c index 6eb6039d6343..d2930a71084b 100644 --- a/net/netfilter/ipvs/ip_vs_proto_udp.c +++ b/net/netfilter/ipvs/ip_vs_proto_udp.c | |||
| @@ -203,8 +203,8 @@ udp_snat_handler(struct sk_buff *skb, | |||
| 203 | */ | 203 | */ |
| 204 | if (skb->ip_summed == CHECKSUM_PARTIAL) { | 204 | if (skb->ip_summed == CHECKSUM_PARTIAL) { |
| 205 | udp_partial_csum_update(cp->af, udph, &cp->daddr, &cp->vaddr, | 205 | udp_partial_csum_update(cp->af, udph, &cp->daddr, &cp->vaddr, |
| 206 | htonl(oldlen), | 206 | htons(oldlen), |
| 207 | htonl(skb->len - udphoff)); | 207 | htons(skb->len - udphoff)); |
| 208 | } else if (!cp->app && (udph->check != 0)) { | 208 | } else if (!cp->app && (udph->check != 0)) { |
| 209 | /* Only port and addr are changed, do fast csum update */ | 209 | /* Only port and addr are changed, do fast csum update */ |
| 210 | udp_fast_csum_update(cp->af, udph, &cp->daddr, &cp->vaddr, | 210 | udp_fast_csum_update(cp->af, udph, &cp->daddr, &cp->vaddr, |
| @@ -279,8 +279,8 @@ udp_dnat_handler(struct sk_buff *skb, | |||
| 279 | */ | 279 | */ |
| 280 | if (skb->ip_summed == CHECKSUM_PARTIAL) { | 280 | if (skb->ip_summed == CHECKSUM_PARTIAL) { |
| 281 | udp_partial_csum_update(cp->af, udph, &cp->daddr, &cp->vaddr, | 281 | udp_partial_csum_update(cp->af, udph, &cp->daddr, &cp->vaddr, |
| 282 | htonl(oldlen), | 282 | htons(oldlen), |
| 283 | htonl(skb->len - udphoff)); | 283 | htons(skb->len - udphoff)); |
| 284 | } else if (!cp->app && (udph->check != 0)) { | 284 | } else if (!cp->app && (udph->check != 0)) { |
| 285 | /* Only port and addr are changed, do fast csum update */ | 285 | /* Only port and addr are changed, do fast csum update */ |
| 286 | udp_fast_csum_update(cp->af, udph, &cp->vaddr, &cp->daddr, | 286 | udp_fast_csum_update(cp->af, udph, &cp->vaddr, &cp->daddr, |
