tcp: Revert per-route SACK/DSACK/TIMESTAMP changes.
It creates a regression, triggering badness for SYN_RECV sockets, for example: [19148.022102] Badness at net/ipv4/inet_connection_sock.c:293 [19148.022570] NIP: c02a0914 LR: c02a0904 CTR: 00000000 [19148.023035] REGS: eeecbd30 TRAP: 0700 Not tainted (2.6.32) [19148.023496] MSR: 00029032 <EE,ME,CE,IR,DR> CR: 24002442 XER: 00000000 [19148.024012] TASK = eee9a820[1756] 'privoxy' THREAD: eeeca000 This is likely caused by the change in the 'estab' parameter passed to tcp_parse_options() when invoked by the functions in net/ipv4/tcp_minisocks.c But even if that is fixed, the ->conn_request() changes made in this patch series is fundamentally wrong. They try to use the listening socket's 'dst' to probe the route settings. The listening socket doesn't even have a route, and you can't get the right route (the child request one) until much later after we setup all of the state, and it must be done by hand. This stuff really isn't ready, so the best thing to do is a full revert. This reverts the following commits:f55017a93f022c3f7d821aba721ebacda42ebd67345cda2fd6dc343475ed05eaade2786a2a2d6bf8Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
@@ -553,7 +553,6 @@ static unsigned tcp_syn_options(struct sock *sk, struct sk_buff *skb,
|
||||
struct tcp_md5sig_key **md5) {
|
||||
struct tcp_sock *tp = tcp_sk(sk);
|
||||
struct tcp_cookie_values *cvp = tp->cookie_values;
|
||||
struct dst_entry *dst = __sk_dst_get(sk);
|
||||
unsigned remaining = MAX_TCP_OPTION_SPACE;
|
||||
u8 cookie_size = (!tp->rx_opt.cookie_out_never && cvp != NULL) ?
|
||||
tcp_cookie_size_check(cvp->cookie_desired) :
|
||||
@@ -581,22 +580,18 @@ static unsigned tcp_syn_options(struct sock *sk, struct sk_buff *skb,
|
||||
opts->mss = tcp_advertise_mss(sk);
|
||||
remaining -= TCPOLEN_MSS_ALIGNED;
|
||||
|
||||
if (likely(sysctl_tcp_timestamps &&
|
||||
!dst_feature(dst, RTAX_FEATURE_NO_TSTAMP) &&
|
||||
*md5 == NULL)) {
|
||||
if (likely(sysctl_tcp_timestamps && *md5 == NULL)) {
|
||||
opts->options |= OPTION_TS;
|
||||
opts->tsval = TCP_SKB_CB(skb)->when;
|
||||
opts->tsecr = tp->rx_opt.ts_recent;
|
||||
remaining -= TCPOLEN_TSTAMP_ALIGNED;
|
||||
}
|
||||
if (likely(sysctl_tcp_window_scaling &&
|
||||
!dst_feature(dst, RTAX_FEATURE_NO_WSCALE))) {
|
||||
if (likely(sysctl_tcp_window_scaling)) {
|
||||
opts->ws = tp->rx_opt.rcv_wscale;
|
||||
opts->options |= OPTION_WSCALE;
|
||||
remaining -= TCPOLEN_WSCALE_ALIGNED;
|
||||
}
|
||||
if (likely(sysctl_tcp_sack &&
|
||||
!dst_feature(dst, RTAX_FEATURE_NO_SACK))) {
|
||||
if (likely(sysctl_tcp_sack)) {
|
||||
opts->options |= OPTION_SACK_ADVERTISE;
|
||||
if (unlikely(!(OPTION_TS & opts->options)))
|
||||
remaining -= TCPOLEN_SACKPERM_ALIGNED;
|
||||
@@ -2527,9 +2522,7 @@ static void tcp_connect_init(struct sock *sk)
|
||||
* See tcp_input.c:tcp_rcv_state_process case TCP_SYN_SENT.
|
||||
*/
|
||||
tp->tcp_header_len = sizeof(struct tcphdr) +
|
||||
(sysctl_tcp_timestamps &&
|
||||
(!dst_feature(dst, RTAX_FEATURE_NO_TSTAMP) ?
|
||||
TCPOLEN_TSTAMP_ALIGNED : 0));
|
||||
(sysctl_tcp_timestamps ? TCPOLEN_TSTAMP_ALIGNED : 0);
|
||||
|
||||
#ifdef CONFIG_TCP_MD5SIG
|
||||
if (tp->af_specific->md5_lookup(sk, sk) != NULL)
|
||||
@@ -2555,8 +2548,7 @@ static void tcp_connect_init(struct sock *sk)
|
||||
tp->advmss - (tp->rx_opt.ts_recent_stamp ? tp->tcp_header_len - sizeof(struct tcphdr) : 0),
|
||||
&tp->rcv_wnd,
|
||||
&tp->window_clamp,
|
||||
(sysctl_tcp_window_scaling &&
|
||||
!dst_feature(dst, RTAX_FEATURE_NO_WSCALE)),
|
||||
sysctl_tcp_window_scaling,
|
||||
&rcv_wscale);
|
||||
|
||||
tp->rx_opt.rcv_wscale = rcv_wscale;
|
||||
|
||||
Reference in New Issue
Block a user