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:f55017a93f
022c3f7d82
1aba721eba
cda42ebd67
345cda2fd6
dc343475ed
05eaade278
6a2a2d6bf8
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
@@ -277,6 +277,13 @@ struct sock *cookie_v4_check(struct sock *sk, struct sk_buff *skb,
|
||||
|
||||
NET_INC_STATS_BH(sock_net(sk), LINUX_MIB_SYNCOOKIESRECV);
|
||||
|
||||
/* check for timestamp cookie support */
|
||||
memset(&tcp_opt, 0, sizeof(tcp_opt));
|
||||
tcp_parse_options(skb, &tcp_opt, &hash_location, 0);
|
||||
|
||||
if (tcp_opt.saw_tstamp)
|
||||
cookie_check_timestamp(&tcp_opt);
|
||||
|
||||
ret = NULL;
|
||||
req = inet_reqsk_alloc(&tcp_request_sock_ops); /* for safety */
|
||||
if (!req)
|
||||
@@ -292,6 +299,12 @@ struct sock *cookie_v4_check(struct sock *sk, struct sk_buff *skb,
|
||||
ireq->loc_addr = ip_hdr(skb)->daddr;
|
||||
ireq->rmt_addr = ip_hdr(skb)->saddr;
|
||||
ireq->ecn_ok = 0;
|
||||
ireq->snd_wscale = tcp_opt.snd_wscale;
|
||||
ireq->rcv_wscale = tcp_opt.rcv_wscale;
|
||||
ireq->sack_ok = tcp_opt.sack_ok;
|
||||
ireq->wscale_ok = tcp_opt.wscale_ok;
|
||||
ireq->tstamp_ok = tcp_opt.saw_tstamp;
|
||||
req->ts_recent = tcp_opt.saw_tstamp ? tcp_opt.rcv_tsval : 0;
|
||||
|
||||
/* We throwed the options of the initial SYN away, so we hope
|
||||
* the ACK carries the same options again (see RFC1122 4.2.3.8)
|
||||
@@ -340,20 +353,6 @@ struct sock *cookie_v4_check(struct sock *sk, struct sk_buff *skb,
|
||||
}
|
||||
}
|
||||
|
||||
/* check for timestamp cookie support */
|
||||
memset(&tcp_opt, 0, sizeof(tcp_opt));
|
||||
tcp_parse_options(skb, &tcp_opt, &hash_location, 0, &rt->u.dst);
|
||||
|
||||
if (tcp_opt.saw_tstamp)
|
||||
cookie_check_timestamp(&tcp_opt);
|
||||
|
||||
ireq->snd_wscale = tcp_opt.snd_wscale;
|
||||
ireq->rcv_wscale = tcp_opt.rcv_wscale;
|
||||
ireq->sack_ok = tcp_opt.sack_ok;
|
||||
ireq->wscale_ok = tcp_opt.wscale_ok;
|
||||
ireq->tstamp_ok = tcp_opt.saw_tstamp;
|
||||
req->ts_recent = tcp_opt.saw_tstamp ? tcp_opt.rcv_tsval : 0;
|
||||
|
||||
/* Try to redo what tcp_v4_send_synack did. */
|
||||
req->window_clamp = tp->window_clamp ? :dst_metric(&rt->u.dst, RTAX_WINDOW);
|
||||
|
||||
|
Reference in New Issue
Block a user