diff options
Diffstat (limited to 'net/ipv4/syncookies.c')
-rw-r--r-- | net/ipv4/syncookies.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/net/ipv4/syncookies.c b/net/ipv4/syncookies.c index 9d38005abbac..d346c22aa6ae 100644 --- a/net/ipv4/syncookies.c +++ b/net/ipv4/syncookies.c | |||
@@ -16,6 +16,7 @@ | |||
16 | #include <linux/cryptohash.h> | 16 | #include <linux/cryptohash.h> |
17 | #include <linux/kernel.h> | 17 | #include <linux/kernel.h> |
18 | #include <net/tcp.h> | 18 | #include <net/tcp.h> |
19 | #include <net/route.h> | ||
19 | 20 | ||
20 | /* Timestamps: lowest 9 bits store TCP options */ | 21 | /* Timestamps: lowest 9 bits store TCP options */ |
21 | #define TSBITS 9 | 22 | #define TSBITS 9 |
@@ -296,6 +297,7 @@ struct sock *cookie_v4_check(struct sock *sk, struct sk_buff *skb, | |||
296 | treq->rcv_isn = ntohl(th->seq) - 1; | 297 | treq->rcv_isn = ntohl(th->seq) - 1; |
297 | treq->snt_isn = cookie; | 298 | treq->snt_isn = cookie; |
298 | req->mss = mss; | 299 | req->mss = mss; |
300 | ireq->loc_port = th->dest; | ||
299 | ireq->rmt_port = th->source; | 301 | ireq->rmt_port = th->source; |
300 | ireq->loc_addr = ip_hdr(skb)->daddr; | 302 | ireq->loc_addr = ip_hdr(skb)->daddr; |
301 | ireq->rmt_addr = ip_hdr(skb)->saddr; | 303 | ireq->rmt_addr = ip_hdr(skb)->saddr; |
@@ -337,6 +339,7 @@ struct sock *cookie_v4_check(struct sock *sk, struct sk_buff *skb, | |||
337 | .saddr = ireq->loc_addr, | 339 | .saddr = ireq->loc_addr, |
338 | .tos = RT_CONN_FLAGS(sk) } }, | 340 | .tos = RT_CONN_FLAGS(sk) } }, |
339 | .proto = IPPROTO_TCP, | 341 | .proto = IPPROTO_TCP, |
342 | .flags = inet_sk_flowi_flags(sk), | ||
340 | .uli_u = { .ports = | 343 | .uli_u = { .ports = |
341 | { .sport = th->dest, | 344 | { .sport = th->dest, |
342 | .dport = th->source } } }; | 345 | .dport = th->source } } }; |