aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/ipvs/ip_vs_proto_tcp.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/ipv4/ipvs/ip_vs_proto_tcp.c')
-rw-r--r--net/ipv4/ipvs/ip_vs_proto_tcp.c12
1 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 e65382da713e..e65577a77006 100644
--- a/net/ipv4/ipvs/ip_vs_proto_tcp.c
+++ b/net/ipv4/ipvs/ip_vs_proto_tcp.c
@@ -83,8 +83,8 @@ tcp_conn_schedule(struct sk_buff *skb,
83 } 83 }
84 84
85 if (th->syn && 85 if (th->syn &&
86 (svc = ip_vs_service_get(skb->mark, skb->nh.iph->protocol, 86 (svc = ip_vs_service_get(skb->mark, ip_hdr(skb)->protocol,
87 skb->nh.iph->daddr, th->dest))) { 87 ip_hdr(skb)->daddr, th->dest))) {
88 if (ip_vs_todrop()) { 88 if (ip_vs_todrop()) {
89 /* 89 /*
90 * It seems that we are very loaded. 90 * It seems that we are very loaded.
@@ -142,7 +142,7 @@ tcp_snat_handler(struct sk_buff **pskb,
142 return 0; 142 return 0;
143 } 143 }
144 144
145 tcph = (void *)(*pskb)->nh.iph + tcphoff; 145 tcph = (void *)ip_hdr(*pskb) + tcphoff;
146 tcph->source = cp->vport; 146 tcph->source = cp->vport;
147 147
148 /* Adjust TCP checksums */ 148 /* Adjust TCP checksums */
@@ -193,7 +193,7 @@ tcp_dnat_handler(struct sk_buff **pskb,
193 return 0; 193 return 0;
194 } 194 }
195 195
196 tcph = (void *)(*pskb)->nh.iph + tcphoff; 196 tcph = (void *)ip_hdr(*pskb) + tcphoff;
197 tcph->dest = cp->dport; 197 tcph->dest = cp->dport;
198 198
199 /* 199 /*
@@ -229,9 +229,9 @@ tcp_csum_check(struct sk_buff *skb, struct ip_vs_protocol *pp)
229 case CHECKSUM_NONE: 229 case CHECKSUM_NONE:
230 skb->csum = skb_checksum(skb, tcphoff, skb->len - tcphoff, 0); 230 skb->csum = skb_checksum(skb, tcphoff, skb->len - tcphoff, 0);
231 case CHECKSUM_COMPLETE: 231 case CHECKSUM_COMPLETE:
232 if (csum_tcpudp_magic(skb->nh.iph->saddr, skb->nh.iph->daddr, 232 if (csum_tcpudp_magic(ip_hdr(skb)->saddr, ip_hdr(skb)->daddr,
233 skb->len - tcphoff, 233 skb->len - tcphoff,
234 skb->nh.iph->protocol, skb->csum)) { 234 ip_hdr(skb)->protocol, skb->csum)) {
235 IP_VS_DBG_RL_PKT(0, pp, skb, 0, 235 IP_VS_DBG_RL_PKT(0, pp, skb, 0,
236 "Failed checksum for"); 236 "Failed checksum for");
237 return 0; 237 return 0;