diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-10-27 11:41:13 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-10-27 11:41:13 -0400 |
commit | 6634160abfdbac39bd5ebda516b15b078a0f598e (patch) | |
tree | 85a570445d953f011b4d00595868f449ac652028 /net/ipv4/tcp_output.c | |
parent | 526719ba51e7d7bd31f7af9ab04b015b70096685 (diff) | |
parent | 8b5f12d04b2e93842f3dda01f029842047bf3f81 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6:
syncookies: fix inclusion of tcp options in syn-ack
libertas: free sk_buff with kfree_skb
btsdio: free sk_buff with kfree_skb
Phonet: do not reply to indication reset packets
Phonet: include generic link-layer header size in MAX_PHONET_HEADER
Diffstat (limited to 'net/ipv4/tcp_output.c')
-rw-r--r-- | net/ipv4/tcp_output.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c index e4c5ac9fe89b..ba85d8831893 100644 --- a/net/ipv4/tcp_output.c +++ b/net/ipv4/tcp_output.c | |||
@@ -2279,6 +2279,11 @@ struct sk_buff *tcp_make_synack(struct sock *sk, struct dst_entry *dst, | |||
2279 | } | 2279 | } |
2280 | 2280 | ||
2281 | memset(&opts, 0, sizeof(opts)); | 2281 | memset(&opts, 0, sizeof(opts)); |
2282 | #ifdef CONFIG_SYN_COOKIES | ||
2283 | if (unlikely(req->cookie_ts)) | ||
2284 | TCP_SKB_CB(skb)->when = cookie_init_timestamp(req); | ||
2285 | else | ||
2286 | #endif | ||
2282 | TCP_SKB_CB(skb)->when = tcp_time_stamp; | 2287 | TCP_SKB_CB(skb)->when = tcp_time_stamp; |
2283 | tcp_header_size = tcp_synack_options(sk, req, mss, | 2288 | tcp_header_size = tcp_synack_options(sk, req, mss, |
2284 | skb, &opts, &md5) + | 2289 | skb, &opts, &md5) + |
@@ -2304,11 +2309,6 @@ struct sk_buff *tcp_make_synack(struct sock *sk, struct dst_entry *dst, | |||
2304 | 2309 | ||
2305 | /* RFC1323: The window in SYN & SYN/ACK segments is never scaled. */ | 2310 | /* RFC1323: The window in SYN & SYN/ACK segments is never scaled. */ |
2306 | th->window = htons(min(req->rcv_wnd, 65535U)); | 2311 | th->window = htons(min(req->rcv_wnd, 65535U)); |
2307 | #ifdef CONFIG_SYN_COOKIES | ||
2308 | if (unlikely(req->cookie_ts)) | ||
2309 | TCP_SKB_CB(skb)->when = cookie_init_timestamp(req); | ||
2310 | else | ||
2311 | #endif | ||
2312 | tcp_options_write((__be32 *)(th + 1), tp, &opts, &md5_hash_location); | 2312 | tcp_options_write((__be32 *)(th + 1), tp, &opts, &md5_hash_location); |
2313 | th->doff = (tcp_header_size >> 2); | 2313 | th->doff = (tcp_header_size >> 2); |
2314 | TCP_INC_STATS(sock_net(sk), TCP_MIB_OUTSEGS); | 2314 | TCP_INC_STATS(sock_net(sk), TCP_MIB_OUTSEGS); |