Fix a bug with syncookies; previously, the syncache's MSS size was not

initialized until after a syncookie was generated.  As a result,
all connections resulting from a returned cookie would end up using
a MSS of ~512 bytes.  Now larger packets will be used where possible.

MFC after:	5 days
This commit is contained in:
Mike Silbersack 2003-01-29 03:49:49 +00:00
parent a42a7e2f13
commit d4d5315c23
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=110023

View File

@ -931,6 +931,8 @@ syncache_add(inc, to, th, sop, m)
sc->sc_route.ro_rt = NULL;
}
sc->sc_irs = th->th_seq;
sc->sc_flags = 0;
sc->sc_peer_mss = to->to_flags & TOF_MSS ? to->to_mss : 0;
if (tcp_syncookies)
sc->sc_iss = syncookie_generate(sc);
else
@ -942,8 +944,6 @@ syncache_add(inc, to, th, sop, m)
win = imin(win, TCP_MAXWIN);
sc->sc_wnd = win;
sc->sc_flags = 0;
sc->sc_peer_mss = to->to_flags & TOF_MSS ? to->to_mss : 0;
if (tcp_do_rfc1323) {
/*
* A timestamp received in a SYN makes