svn commit: r352737 - head/sys/contrib/ipfilter/netinet

Cy Schubert cy at FreeBSD.org
Thu Sep 26 03:09:43 UTC 2019


Author: cy
Date: Thu Sep 26 03:09:42 2019
New Revision: 352737
URL: https://svnweb.freebsd.org/changeset/base/352737

Log:
  ipf mistakenly regards UDP packets with a checksum of 0xffff as bad.
  
  Obtained from:	NetBSD fil.c r1.30, NetBSD PR/54443
  MFC after:	3 days

Modified:
  head/sys/contrib/ipfilter/netinet/fil.c

Modified: head/sys/contrib/ipfilter/netinet/fil.c
==============================================================================
--- head/sys/contrib/ipfilter/netinet/fil.c	Thu Sep 26 02:54:45 2019	(r352736)
+++ head/sys/contrib/ipfilter/netinet/fil.c	Thu Sep 26 03:09:42 2019	(r352737)
@@ -6730,8 +6730,11 @@ ipf_checkl4sum(fin)
 		/*NOTREACHED*/
 	}
 
-	if (csump != NULL)
+	if (csump != NULL) {
 		hdrsum = *csump;
+		if (fin->fin_p == IPPROTO_UDP && hdrsum == 0xffff)
+			hdrsum = 0x0000;
+	}
 
 	if (dosum) {
 		sum = fr_cksum(fin, fin->fin_ip, fin->fin_p, fin->fin_dp);


More information about the svn-src-head mailing list