svn commit: r242076 - head/sys/netinet

Gleb Smirnoff glebius at FreeBSD.org
Thu Oct 25 09:00:57 UTC 2012


Author: glebius
Date: Thu Oct 25 09:00:57 2012
New Revision: 242076
URL: http://svn.freebsd.org/changeset/base/242076

Log:
  Fix error in r241913 that had broken fragment reassembly.

Modified:
  head/sys/netinet/ip_input.c

Modified: head/sys/netinet/ip_input.c
==============================================================================
--- head/sys/netinet/ip_input.c	Thu Oct 25 08:38:43 2012	(r242075)
+++ head/sys/netinet/ip_input.c	Thu Oct 25 09:00:57 2012	(r242076)
@@ -904,7 +904,7 @@ found:
 		 * Make sure that fragments have a data length
 		 * that's a non-zero multiple of 8 bytes.
 		 */
-		if (ntohs(ip->ip_len) == 0 || (ntohs(ip->ip_len & 0x7) != 0)) {
+		if (ip->ip_len == htons(0) || (ntohs(ip->ip_len) & 0x7) != 0) {
 			IPSTAT_INC(ips_toosmall); /* XXX */
 			goto dropfrag;
 		}


More information about the svn-src-all mailing list