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/syncookies.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/syncookies.c')
-rw-r--r-- | net/ipv4/syncookies.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/net/ipv4/syncookies.c b/net/ipv4/syncookies.c index 33016cc90f0b..261607178491 100644 --- a/net/ipv4/syncookies.c +++ b/net/ipv4/syncookies.c | |||
@@ -138,7 +138,7 @@ __u32 cookie_v4_init_sequence(struct sock *sk, struct sk_buff *skb, __u16 *mssp) | |||
138 | 138 | ||
139 | NET_INC_STATS_BH(LINUX_MIB_SYNCOOKIESSENT); | 139 | NET_INC_STATS_BH(LINUX_MIB_SYNCOOKIESSENT); |
140 | 140 | ||
141 | return secure_tcp_syn_cookie(skb->nh.iph->saddr, skb->nh.iph->daddr, | 141 | return secure_tcp_syn_cookie(ip_hdr(skb)->saddr, ip_hdr(skb)->daddr, |
142 | skb->h.th->source, skb->h.th->dest, | 142 | skb->h.th->source, skb->h.th->dest, |
143 | ntohl(skb->h.th->seq), | 143 | ntohl(skb->h.th->seq), |
144 | jiffies / (HZ * 60), mssind); | 144 | jiffies / (HZ * 60), mssind); |
@@ -162,7 +162,7 @@ static inline int cookie_check(struct sk_buff *skb, __u32 cookie) | |||
162 | 162 | ||
163 | seq = ntohl(skb->h.th->seq)-1; | 163 | seq = ntohl(skb->h.th->seq)-1; |
164 | mssind = check_tcp_syn_cookie(cookie, | 164 | mssind = check_tcp_syn_cookie(cookie, |
165 | skb->nh.iph->saddr, skb->nh.iph->daddr, | 165 | ip_hdr(skb)->saddr, ip_hdr(skb)->daddr, |
166 | skb->h.th->source, skb->h.th->dest, | 166 | skb->h.th->source, skb->h.th->dest, |
167 | seq, jiffies / (HZ * 60), COUNTER_TRIES); | 167 | seq, jiffies / (HZ * 60), COUNTER_TRIES); |
168 | 168 | ||
@@ -224,8 +224,8 @@ struct sock *cookie_v4_check(struct sock *sk, struct sk_buff *skb, | |||
224 | treq->snt_isn = cookie; | 224 | treq->snt_isn = cookie; |
225 | req->mss = mss; | 225 | req->mss = mss; |
226 | ireq->rmt_port = skb->h.th->source; | 226 | ireq->rmt_port = skb->h.th->source; |
227 | ireq->loc_addr = skb->nh.iph->daddr; | 227 | ireq->loc_addr = ip_hdr(skb)->daddr; |
228 | ireq->rmt_addr = skb->nh.iph->saddr; | 228 | ireq->rmt_addr = ip_hdr(skb)->saddr; |
229 | ireq->opt = NULL; | 229 | ireq->opt = NULL; |
230 | 230 | ||
231 | /* We throwed the options of the initial SYN away, so we hope | 231 | /* We throwed the options of the initial SYN away, so we hope |