On Mon, 10 Jan 2005, Don Lewis wrote:

Now that I've looked at the above case, it looks to me like your
suggested patch might affect the response to a legitimate duplicate SYN.
It will definitely follow a different code path.

You're right, I neglected to handle the duplicate SYN case.

Couldn't we centralize all SYN handling right after trimthenstep6:?

We could do something there like

if (th->th_seq != tp->irs) {
        goto dropafterack; /* Or however we handle these bad syns */
} else {
thflags &= ~TH_SYN;
th->th_seq++;
if (th->th_urp > 1)
        th->th_urp--;
else
        thflags &= ~TH_URG;
todrop--;
}

And then we could tear out all the two places TH_SYN is mentioned below, the place I copied from, and the place where there the tcp_drop() is.

If we made that change, then we'd still be doing only one check for TH_SYN, but the code would be a lot easier to comprehend.

Mike "Silby" Silbersack
_______________________________________________
freebsd-net@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-net
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to