Correct handling of SYN packets that are to the left of the current window of an ESTABLISHED connection.

Reviewed by:        net@, gnn
Approved by:        dfr (mentor)
This commit is contained in:
Zachary Loafman 2009-05-27 17:02:10 +00:00
parent 6d72217368
commit 81ad7eb017

View File

@ -1818,7 +1818,11 @@ tcp_do_segment(struct mbuf *m, struct tcphdr *th, struct socket *so,
todrop = tp->rcv_nxt - th->th_seq;
if (todrop > 0) {
if (thflags & TH_SYN) {
/*
* If this is a duplicate SYN for our current connection,
* advance over it and pretend and it's not a SYN.
*/
if (thflags & TH_SYN && th->th_seq == tp->irs) {
thflags &= ~TH_SYN;
th->th_seq++;
if (th->th_urp > 1)