On Sat, Jul 08, 2000 at 07:12:34PM +0400, A.N.Kuznetsov wrote: > If new SYN is inside window, but its sequence number is > different (it would not be not new otherwise 8)), > connection is aborted and reset is sent. Ok, here is a patch. --- linux/net/ipv4/tcp_input.c Sun Jul 2 13:14:12 2000 +++ linux-work/net/ipv4/tcp_input.c Sat Jul 8 17:56:50 2000 @@ -1990,14 +1990,16 @@ flg &= __constant_htonl(0x00170000); /* Only SYN set? */ if (flg == __constant_htonl(0x00020000)) { - if (TCP_SKB_CB(skb)->seq == req->rcv_isn) { - /* retransmited syn. - */ + __u32 seq = TCP_SKB_CB(skb)->seq; + /* Retransmission or out of window -> ACK */ + if (seq == req->rcv_isn || + before(seq, req->rcv_isn) || + after(seq, req->rcv_isn + req->rcv_wnd)) { req->class->rtx_syn_ack(sk, req); - return NULL; } else { - return sk; /* Pass new SYN to the listen socket. */ + req->class->send_reset(skb); } + return NULL; } /* We know it's an ACK here */ -Andi - : send the line "unsubscribe linux-net" in the body of a message to majordomo@vger.rutgers.edu