mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-23 07:12:09 +00:00
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>
This commit is contained in:
parent
f55017a93f
commit
022c3f7d82
7 changed files with 56 additions and 42 deletions
|
@ -3698,12 +3698,14 @@ old_ack:
|
|||
* the fast version below fails.
|
||||
*/
|
||||
void tcp_parse_options(struct sk_buff *skb, struct tcp_options_received *opt_rx,
|
||||
int estab)
|
||||
int estab, struct dst_entry *dst)
|
||||
{
|
||||
unsigned char *ptr;
|
||||
struct tcphdr *th = tcp_hdr(skb);
|
||||
int length = (th->doff * 4) - sizeof(struct tcphdr);
|
||||
|
||||
BUG_ON(!estab && !dst);
|
||||
|
||||
ptr = (unsigned char *)(th + 1);
|
||||
opt_rx->saw_tstamp = 0;
|
||||
|
||||
|
@ -3820,7 +3822,7 @@ static int tcp_fast_parse_options(struct sk_buff *skb, struct tcphdr *th,
|
|||
if (tcp_parse_aligned_timestamp(tp, th))
|
||||
return 1;
|
||||
}
|
||||
tcp_parse_options(skb, &tp->rx_opt, 1);
|
||||
tcp_parse_options(skb, &tp->rx_opt, 1, NULL);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
@ -5364,8 +5366,9 @@ static int tcp_rcv_synsent_state_process(struct sock *sk, struct sk_buff *skb,
|
|||
struct tcp_sock *tp = tcp_sk(sk);
|
||||
struct inet_connection_sock *icsk = inet_csk(sk);
|
||||
int saved_clamp = tp->rx_opt.mss_clamp;
|
||||
struct dst_entry *dst = __sk_dst_get(sk);
|
||||
|
||||
tcp_parse_options(skb, &tp->rx_opt, 0);
|
||||
tcp_parse_options(skb, &tp->rx_opt, 0, dst);
|
||||
|
||||
if (th->ack) {
|
||||
/* rfc793:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue