diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2007-04-21 01:47:35 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2007-04-26 01:25:10 -0400 |
commit | eddc9ec53be2ecdbf4efe0efd4a83052594f0ac0 (patch) | |
tree | 4a38ab4dbd9d61fdf5a5ea6ed61463e0b9e33ba7 /net/ipv4/ipvs/ip_vs_proto_tcp.c | |
parent | e023dd643798c4f06c16466af90b4d250e4b8bd7 (diff) |
[SK_BUFF]: Introduce ip_hdr(), remove skb->nh.iph
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/ipvs/ip_vs_proto_tcp.c')
-rw-r--r-- | net/ipv4/ipvs/ip_vs_proto_tcp.c | 12 |
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; |