aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/tcp_minisocks.c
diff options
context:
space:
mode:
authorGilad Ben-Yossef <gilad@codefidence.com>2009-10-28 00:15:22 -0400
committerDavid S. Miller <davem@davemloft.net>2009-10-29 04:28:41 -0400
commit022c3f7d82f0f1c68018696f2f027b87b9bb45c2 (patch)
treeca46c372d815e46f488ec348ae427d34d1f6079e /net/ipv4/tcp_minisocks.c
parentf55017a93f1a74d50244b1254b9a2bd7ac9bbf7d (diff)
Allow tcp_parse_options to consult dst entry
We need tcp_parse_options to be aware of dst_entry to take into account per dst_entry TCP options settings Signed-off-by: Gilad Ben-Yossef <gilad@codefidence.com> Sigend-off-by: Ori Finkelman <ori@comsleep.com> Sigend-off-by: Yony Amit <yony@comsleep.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/tcp_minisocks.c')
-rw-r--r--net/ipv4/tcp_minisocks.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/net/ipv4/tcp_minisocks.c b/net/ipv4/tcp_minisocks.c
index 015e7c67dc88..463d51b53d37 100644
--- a/net/ipv4/tcp_minisocks.c
+++ b/net/ipv4/tcp_minisocks.c
@@ -102,7 +102,7 @@ tcp_timewait_state_process(struct inet_timewait_sock *tw, struct sk_buff *skb,
102 102
103 if (th->doff > (sizeof(*th) >> 2) && tcptw->tw_ts_recent_stamp) { 103 if (th->doff > (sizeof(*th) >> 2) && tcptw->tw_ts_recent_stamp) {
104 tmp_opt.tstamp_ok = 1; 104 tmp_opt.tstamp_ok = 1;
105 tcp_parse_options(skb, &tmp_opt, 1); 105 tcp_parse_options(skb, &tmp_opt, 1, NULL);
106 106
107 if (tmp_opt.saw_tstamp) { 107 if (tmp_opt.saw_tstamp) {
108 tmp_opt.ts_recent = tcptw->tw_ts_recent; 108 tmp_opt.ts_recent = tcptw->tw_ts_recent;
@@ -500,10 +500,11 @@ struct sock *tcp_check_req(struct sock *sk, struct sk_buff *skb,
500 int paws_reject = 0; 500 int paws_reject = 0;
501 struct tcp_options_received tmp_opt; 501 struct tcp_options_received tmp_opt;
502 struct sock *child; 502 struct sock *child;
503 struct dst_entry *dst = inet_csk_route_req(sk, req);
503 504
504 tmp_opt.saw_tstamp = 0; 505 tmp_opt.saw_tstamp = 0;
505 if (th->doff > (sizeof(struct tcphdr)>>2)) { 506 if (th->doff > (sizeof(struct tcphdr)>>2)) {
506 tcp_parse_options(skb, &tmp_opt, 0); 507 tcp_parse_options(skb, &tmp_opt, 0, dst);
507 508
508 if (tmp_opt.saw_tstamp) { 509 if (tmp_opt.saw_tstamp) {
509 tmp_opt.ts_recent = req->ts_recent; 510 tmp_opt.ts_recent = req->ts_recent;
@@ -516,6 +517,8 @@ struct sock *tcp_check_req(struct sock *sk, struct sk_buff *skb,
516 } 517 }
517 } 518 }
518 519
520 dst_release(dst);
521
519 /* Check for pure retransmitted SYN. */ 522 /* Check for pure retransmitted SYN. */
520 if (TCP_SKB_CB(skb)->seq == tcp_rsk(req)->rcv_isn && 523 if (TCP_SKB_CB(skb)->seq == tcp_rsk(req)->rcv_isn &&
521 flg == TCP_FLAG_SYN && 524 flg == TCP_FLAG_SYN &&