diff options
Diffstat (limited to 'net')
-rw-r--r-- | net/ipv4/ipvs/ip_vs_proto_tcp.c | 6 | ||||
-rw-r--r-- | net/ipv4/ipvs/ip_vs_proto_udp.c | 6 |
2 files changed, 6 insertions, 6 deletions
diff --git a/net/ipv4/ipvs/ip_vs_proto_tcp.c b/net/ipv4/ipvs/ip_vs_proto_tcp.c index b60a07910df7..16a9ebee2fe6 100644 --- a/net/ipv4/ipvs/ip_vs_proto_tcp.c +++ b/net/ipv4/ipvs/ip_vs_proto_tcp.c | |||
@@ -116,9 +116,9 @@ tcp_fast_csum_update(struct tcphdr *tcph, __be32 oldip, __be32 newip, | |||
116 | __be16 oldport, __be16 newport) | 116 | __be16 oldport, __be16 newport) |
117 | { | 117 | { |
118 | tcph->check = | 118 | tcph->check = |
119 | ip_vs_check_diff(~oldip, newip, | 119 | csum_fold(ip_vs_check_diff4(oldip, newip, |
120 | ip_vs_check_diff(oldport ^ htons(0xFFFF), | 120 | ip_vs_check_diff2(oldport, newport, |
121 | newport, tcph->check)); | 121 | ~csum_unfold(tcph->check)))); |
122 | } | 122 | } |
123 | 123 | ||
124 | 124 | ||
diff --git a/net/ipv4/ipvs/ip_vs_proto_udp.c b/net/ipv4/ipvs/ip_vs_proto_udp.c index 3647397e416d..03f0a414cfa4 100644 --- a/net/ipv4/ipvs/ip_vs_proto_udp.c +++ b/net/ipv4/ipvs/ip_vs_proto_udp.c | |||
@@ -121,9 +121,9 @@ udp_fast_csum_update(struct udphdr *uhdr, __be32 oldip, __be32 newip, | |||
121 | __be16 oldport, __be16 newport) | 121 | __be16 oldport, __be16 newport) |
122 | { | 122 | { |
123 | uhdr->check = | 123 | uhdr->check = |
124 | ip_vs_check_diff(~oldip, newip, | 124 | csum_fold(ip_vs_check_diff4(oldip, newip, |
125 | ip_vs_check_diff(oldport ^ htons(0xFFFF), | 125 | ip_vs_check_diff2(oldport, newport, |
126 | newport, uhdr->check)); | 126 | ~csum_unfold(uhdr->check)))); |
127 | if (!uhdr->check) | 127 | if (!uhdr->check) |
128 | uhdr->check = CSUM_MANGLED_0; | 128 | uhdr->check = CSUM_MANGLED_0; |
129 | } | 129 | } |