PERFORCE change 168298 for review

Andre Oppermann andre at FreeBSD.org
Mon Sep 7 19:52:47 UTC 2009


http://perforce.freebsd.org/chv.cgi?CH=168298

Change 168298 by andre at andre_t61 on 2009/09/07 19:52:39

	Require the window to be at least one mss. A smaller window
	is bogus.

Affected files ...

.. //depot/projects/tcp_new/netinet/tcp_syncache.c#6 edit

Differences ...

==== //depot/projects/tcp_new/netinet/tcp_syncache.c#6 (text+ko) ====

@@ -953,6 +953,17 @@
 		goto failed;
 	}
 
+	/*
+	 * Window should be at least one segment.
+	 */
+	if ((th->th_win << sc->sc_requested_r_scale) < sc->sc_peer_mss) {
+		if ((s = tcp_log_addrs(inc, th, NULL, NULL)))
+			log(LOG_DEBUG, "%s; %s: window smaller than one mss, "
+			    "segment rejected\n",
+			    s, __func__);
+		goto failed;
+	}
+
 	*lsop = syncache_socket(sc, *lsop, m);
 
 	if (*lsop == NULL)


More information about the p4-projects mailing list