diff options
Diffstat (limited to 'net')
-rw-r--r-- | net/netfilter/nf_conntrack_proto_tcp.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/net/netfilter/nf_conntrack_proto_tcp.c b/net/netfilter/nf_conntrack_proto_tcp.c index c707534597..4dc23ab3a3 100644 --- a/net/netfilter/nf_conntrack_proto_tcp.c +++ b/net/netfilter/nf_conntrack_proto_tcp.c | |||
@@ -834,10 +834,12 @@ static int tcp_packet(struct nf_conn *conntrack, | |||
834 | case TCP_CONNTRACK_SYN_SENT: | 834 | case TCP_CONNTRACK_SYN_SENT: |
835 | if (old_state < TCP_CONNTRACK_TIME_WAIT) | 835 | if (old_state < TCP_CONNTRACK_TIME_WAIT) |
836 | break; | 836 | break; |
837 | if (conntrack->proto.tcp.seen[!dir].flags & | 837 | if ((conntrack->proto.tcp.seen[!dir].flags & |
838 | IP_CT_TCP_FLAG_CLOSE_INIT) { | 838 | IP_CT_TCP_FLAG_CLOSE_INIT) |
839 | /* Attempt to reopen a closed connection. | 839 | || (conntrack->proto.tcp.last_dir == dir |
840 | * Delete this connection and look up again. */ | 840 | && conntrack->proto.tcp.last_index == TCP_RST_SET)) { |
841 | /* Attempt to reopen a closed/aborted connection. | ||
842 | * Delete this connection and look up again. */ | ||
841 | write_unlock_bh(&tcp_lock); | 843 | write_unlock_bh(&tcp_lock); |
842 | if (del_timer(&conntrack->timeout)) | 844 | if (del_timer(&conntrack->timeout)) |
843 | conntrack->timeout.function((unsigned long) | 845 | conntrack->timeout.function((unsigned long) |
@@ -925,6 +927,7 @@ static int tcp_packet(struct nf_conn *conntrack, | |||
925 | in_window: | 927 | in_window: |
926 | /* From now on we have got in-window packets */ | 928 | /* From now on we have got in-window packets */ |
927 | conntrack->proto.tcp.last_index = index; | 929 | conntrack->proto.tcp.last_index = index; |
930 | conntrack->proto.tcp.last_dir = dir; | ||
928 | 931 | ||
929 | pr_debug("tcp_conntracks: "); | 932 | pr_debug("tcp_conntracks: "); |
930 | NF_CT_DUMP_TUPLE(tuple); | 933 | NF_CT_DUMP_TUPLE(tuple); |