diff --git a/sys/netinet/tcp_debug.c b/sys/netinet/tcp_debug.c index 89e9d7cbc94a..531d894453f7 100644 --- a/sys/netinet/tcp_debug.c +++ b/sys/netinet/tcp_debug.c @@ -55,6 +55,7 @@ #include #include +#include #include #include #include diff --git a/sys/netinet/tcp_syncache.c b/sys/netinet/tcp_syncache.c index d6ce983adfc8..bf6432bf69f7 100644 --- a/sys/netinet/tcp_syncache.c +++ b/sys/netinet/tcp_syncache.c @@ -900,7 +900,10 @@ syncache_add(inc, to, th, sop, m) sc->sc_route.ro_rt = NULL; } sc->sc_irs = th->th_seq; - sc->sc_iss = syncookie_generate(sc); + if (tcp_syncookies) + sc->sc_iss = syncookie_generate(sc); + else + sc->sc_iss = arc4random(); /* Initial receive window: clip sbspace to [0 .. TCP_MAXWIN] */ win = sbspace(&so->so_rcv);