From b6f99b6891ccd4dfdc60aa9a0c104b3eb6374535 Mon Sep 17 00:00:00 2001 From: "Denis V. Lunev" Date: Mon, 3 Mar 2008 11:59:32 -0800 Subject: [PATCH] --- yaml --- r: 89985 b: refs/heads/master c: 7cd04fa7e35100877592f6be4efdccac0fed62b2 h: refs/heads/master i: 89983: d18b1fad3720b025c860f2d43e21b42eeb31724e v: v3 --- [refs] | 2 +- trunk/net/ipv4/tcp_ipv4.c | 16 ++++++---------- 2 files changed, 7 insertions(+), 11 deletions(-) diff --git a/[refs] b/[refs] index 832d329f33d9..21d5bdbcaa46 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: f0fd56ed40ec5fb889bfc7efccd1c5759e6e9937 +refs/heads/master: 7cd04fa7e35100877592f6be4efdccac0fed62b2 diff --git a/trunk/net/ipv4/tcp_ipv4.c b/trunk/net/ipv4/tcp_ipv4.c index 3b26f9586dcb..3873c4dbeaeb 100644 --- a/trunk/net/ipv4/tcp_ipv4.c +++ b/trunk/net/ipv4/tcp_ipv4.c @@ -1355,8 +1355,7 @@ int tcp_v4_conn_request(struct sock *sk, struct sk_buff *skb) (s32)(peer->tcp_ts - req->ts_recent) > TCP_PAWS_WINDOW) { NET_INC_STATS_BH(LINUX_MIB_PAWSPASSIVEREJECTED); - dst_release(dst); - goto drop_and_free; + goto drop_and_release; } } /* Kill the following clause, if you dislike this way. */ @@ -1376,24 +1375,21 @@ int tcp_v4_conn_request(struct sock *sk, struct sk_buff *skb) "request from %u.%u.%u.%u/%u\n", NIPQUAD(saddr), ntohs(tcp_hdr(skb)->source)); - dst_release(dst); - goto drop_and_free; + goto drop_and_release; } isn = tcp_v4_init_sequence(skb); } tcp_rsk(req)->snt_isn = isn; - if (__tcp_v4_send_synack(sk, req, dst)) + if (__tcp_v4_send_synack(sk, req, dst) || want_cookie) goto drop_and_free; - if (want_cookie) { - reqsk_free(req); - } else { - inet_csk_reqsk_queue_hash_add(sk, req, TCP_TIMEOUT_INIT); - } + inet_csk_reqsk_queue_hash_add(sk, req, TCP_TIMEOUT_INIT); return 0; +drop_and_release: + dst_release(dst); drop_and_free: reqsk_free(req); drop: