Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 29 Sep 2019 03:41:16 +0000 (UTC)
From:      Cy Schubert <cy@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
Subject:   svn commit: r352866 - in stable: 10/sys/contrib/ipfilter/netinet 11/sys/contrib/ipfilter/netinet 12/sys/contrib/ipfilter/netinet
Message-ID:  <201909290341.x8T3fGN4011744@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: cy
Date: Sun Sep 29 03:41:15 2019
New Revision: 352866
URL: https://svnweb.freebsd.org/changeset/base/352866

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

Modified:
  stable/11/sys/contrib/ipfilter/netinet/fil.c
Directory Properties:
  stable/11/   (props changed)

Changes in other areas also in this revision:
Modified:
  stable/10/sys/contrib/ipfilter/netinet/fil.c
  stable/12/sys/contrib/ipfilter/netinet/fil.c
Directory Properties:
  stable/10/   (props changed)
  stable/12/   (props changed)

Modified: stable/11/sys/contrib/ipfilter/netinet/fil.c
==============================================================================
--- stable/11/sys/contrib/ipfilter/netinet/fil.c	Sun Sep 29 03:36:50 2019	(r352865)
+++ stable/11/sys/contrib/ipfilter/netinet/fil.c	Sun Sep 29 03:41:15 2019	(r352866)
@@ -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);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201909290341.x8T3fGN4011744>