|
@@ -6327,31 +6327,11 @@ int tcp_conn_request(struct request_sock_ops *rsk_ops,
|
|
af_ops->init_seq_tsoff(skb, &tcp_rsk(req)->ts_off);
|
|
af_ops->init_seq_tsoff(skb, &tcp_rsk(req)->ts_off);
|
|
|
|
|
|
if (!want_cookie && !isn) {
|
|
if (!want_cookie && !isn) {
|
|
- /* VJ's idea. We save last timestamp seen
|
|
|
|
- * from the destination in peer table, when entering
|
|
|
|
- * state TIME-WAIT, and check against it before
|
|
|
|
- * accepting new connection request.
|
|
|
|
- *
|
|
|
|
- * If "isn" is not zero, this request hit alive
|
|
|
|
- * timewait bucket, so that all the necessary checks
|
|
|
|
- * are made in the function processing timewait state.
|
|
|
|
- */
|
|
|
|
- if (net->ipv4.tcp_death_row.sysctl_tw_recycle) {
|
|
|
|
- bool strict;
|
|
|
|
-
|
|
|
|
- dst = af_ops->route_req(sk, &fl, req, &strict);
|
|
|
|
-
|
|
|
|
- if (dst && strict &&
|
|
|
|
- !tcp_peer_is_proven(req, dst)) {
|
|
|
|
- NET_INC_STATS(sock_net(sk), LINUX_MIB_PAWSPASSIVEREJECTED);
|
|
|
|
- goto drop_and_release;
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
/* Kill the following clause, if you dislike this way. */
|
|
/* Kill the following clause, if you dislike this way. */
|
|
- else if (!net->ipv4.sysctl_tcp_syncookies &&
|
|
|
|
- (net->ipv4.sysctl_max_syn_backlog - inet_csk_reqsk_queue_len(sk) <
|
|
|
|
- (net->ipv4.sysctl_max_syn_backlog >> 2)) &&
|
|
|
|
- !tcp_peer_is_proven(req, dst)) {
|
|
|
|
|
|
+ if (!net->ipv4.sysctl_tcp_syncookies &&
|
|
|
|
+ (net->ipv4.sysctl_max_syn_backlog - inet_csk_reqsk_queue_len(sk) <
|
|
|
|
+ (net->ipv4.sysctl_max_syn_backlog >> 2)) &&
|
|
|
|
+ !tcp_peer_is_proven(req, dst)) {
|
|
/* Without syncookies last quarter of
|
|
/* Without syncookies last quarter of
|
|
* backlog is filled with destinations,
|
|
* backlog is filled with destinations,
|
|
* proven to be alive.
|
|
* proven to be alive.
|
|
@@ -6367,7 +6347,7 @@ int tcp_conn_request(struct request_sock_ops *rsk_ops,
|
|
isn = af_ops->init_seq_tsoff(skb, &tcp_rsk(req)->ts_off);
|
|
isn = af_ops->init_seq_tsoff(skb, &tcp_rsk(req)->ts_off);
|
|
}
|
|
}
|
|
if (!dst) {
|
|
if (!dst) {
|
|
- dst = af_ops->route_req(sk, &fl, req, NULL);
|
|
|
|
|
|
+ dst = af_ops->route_req(sk, &fl, req);
|
|
if (!dst)
|
|
if (!dst)
|
|
goto drop_and_free;
|
|
goto drop_and_free;
|
|
}
|
|
}
|