diff options
author | Gilad Ben-Yossef <gilad@codefidence.com> | 2009-10-28 00:15:22 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-10-29 04:28:41 -0400 |
commit | 022c3f7d82f0f1c68018696f2f027b87b9bb45c2 (patch) | |
tree | ca46c372d815e46f488ec348ae427d34d1f6079e /net/ipv4/tcp_input.c | |
parent | f55017a93f1a74d50244b1254b9a2bd7ac9bbf7d (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_input.c')
-rw-r--r-- | net/ipv4/tcp_input.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c index a0c3700bae3a..c7625005486d 100644 --- a/net/ipv4/tcp_input.c +++ b/net/ipv4/tcp_input.c | |||
@@ -3698,12 +3698,14 @@ old_ack: | |||
3698 | * the fast version below fails. | 3698 | * the fast version below fails. |
3699 | */ | 3699 | */ |
3700 | void tcp_parse_options(struct sk_buff *skb, struct tcp_options_received *opt_rx, | 3700 | void tcp_parse_options(struct sk_buff *skb, struct tcp_options_received *opt_rx, |
3701 | int estab) | 3701 | int estab, struct dst_entry *dst) |
3702 | { | 3702 | { |
3703 | unsigned char *ptr; | 3703 | unsigned char *ptr; |
3704 | struct tcphdr *th = tcp_hdr(skb); | 3704 | struct tcphdr *th = tcp_hdr(skb); |
3705 | int length = (th->doff * 4) - sizeof(struct tcphdr); | 3705 | int length = (th->doff * 4) - sizeof(struct tcphdr); |
3706 | 3706 | ||
3707 | BUG_ON(!estab && !dst); | ||
3708 | |||
3707 | ptr = (unsigned char *)(th + 1); | 3709 | ptr = (unsigned char *)(th + 1); |
3708 | opt_rx->saw_tstamp = 0; | 3710 | opt_rx->saw_tstamp = 0; |
3709 | 3711 | ||
@@ -3820,7 +3822,7 @@ static int tcp_fast_parse_options(struct sk_buff *skb, struct tcphdr *th, | |||
3820 | if (tcp_parse_aligned_timestamp(tp, th)) | 3822 | if (tcp_parse_aligned_timestamp(tp, th)) |
3821 | return 1; | 3823 | return 1; |
3822 | } | 3824 | } |
3823 | tcp_parse_options(skb, &tp->rx_opt, 1); | 3825 | tcp_parse_options(skb, &tp->rx_opt, 1, NULL); |
3824 | return 1; | 3826 | return 1; |
3825 | } | 3827 | } |
3826 | 3828 | ||
@@ -5364,8 +5366,9 @@ static int tcp_rcv_synsent_state_process(struct sock *sk, struct sk_buff *skb, | |||
5364 | struct tcp_sock *tp = tcp_sk(sk); | 5366 | struct tcp_sock *tp = tcp_sk(sk); |
5365 | struct inet_connection_sock *icsk = inet_csk(sk); | 5367 | struct inet_connection_sock *icsk = inet_csk(sk); |
5366 | int saved_clamp = tp->rx_opt.mss_clamp; | 5368 | int saved_clamp = tp->rx_opt.mss_clamp; |
5369 | struct dst_entry *dst = __sk_dst_get(sk); | ||
5367 | 5370 | ||
5368 | tcp_parse_options(skb, &tp->rx_opt, 0); | 5371 | tcp_parse_options(skb, &tp->rx_opt, 0, dst); |
5369 | 5372 | ||
5370 | if (th->ack) { | 5373 | if (th->ack) { |
5371 | /* rfc793: | 5374 | /* rfc793: |