From owner-svn-src-head@freebsd.org Sat Aug 5 00:35:14 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7ED1BDD18BB; Sat, 5 Aug 2017 00:35:14 +0000 (UTC) (envelope-from cy.schubert@komquats.com) Received: from smtp-out-no.shaw.ca (smtp-out-no.shaw.ca [64.59.134.9]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 2970181F72; Sat, 5 Aug 2017 00:35:13 +0000 (UTC) (envelope-from cy.schubert@komquats.com) Received: from spqr.komquats.com ([96.50.22.10]) by shaw.ca with SMTP id dn3Ydvvg8M9gtdn3Zd1oxO; Fri, 04 Aug 2017 18:35:07 -0600 X-Authority-Analysis: v=2.2 cv=a+JAzQaF c=1 sm=1 tr=0 a=jvE2nwUzI0ECrNeyr98KWA==:117 a=jvE2nwUzI0ECrNeyr98KWA==:17 a=kj9zAlcOel0A:10 a=KeKAF7QvOSUA:10 a=6I5d2MoRAAAA:8 a=YxBL1-UpAAAA:8 a=6Vuxsx63iLNc-3tpRSQA:9 a=CjuIK1q_8ugA:10 a=IjZwj45LgO3ly-622nXo:22 a=Ia-lj3WSrqcvXOmTRaiG:22 Received: from slippy.cwsent.com (slippy [10.1.1.91]) by spqr.komquats.com (Postfix) with ESMTPS id 2088FB3; Fri, 4 Aug 2017 17:35:04 -0700 (PDT) Received: from slippy (localhost [127.0.0.1]) by slippy.cwsent.com (8.15.2/8.15.2) with ESMTP id v750Xm3F076876; Fri, 4 Aug 2017 17:33:48 -0700 (PDT) (envelope-from Cy.Schubert@cschubert.com) Message-Id: <201708050033.v750Xm3F076876@slippy.cwsent.com> X-Mailer: exmh version 2.8.0 04/21/2012 with nmh-1.6 Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.cschubert.com/ To: Cy Schubert cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r322073 - head/sys/contrib/ipfilter/netinet In-Reply-To: Message from Cy Schubert of "Sat, 05 Aug 2017 00:28:42 -0000." <201708050028.v750Sgsj015800@repo.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Fri, 04 Aug 2017 17:33:48 -0700 X-CMAE-Envelope: MS4wfBHRIHGHDfo9MsUYbPRMiHNudLdy5VxSCw32+oRcXjgJlxC5iuhimk3V1Wnur1Tl8zN126FMH72JHmL4m0RHYzdPVcGm2yo3naiL9v+Jwcwv4canmjeW B/bHLWv5h7uT5eA0l6B7dcm486M8SB9DTTpeF0+uEMXZr3PJGU1C/E1Uc2nIdZ6pYJmlH/onUhH8bSwl7SFFMV2m+OiHUM3lVRO8iqYVWO8g4EB7UqTJ3+OL IleOOYvjMQhPK5l+QhsUf3GGoL2FEq0dBId+Sd0LC9wJdgiOS5SaY1uxW2VvYJ5P X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Aug 2017 00:35:14 -0000 In message <201708050028.v750Sgsj015800@repo.freebsd.org>, Cy Schubert writes: > Author: cy > Date: Sat Aug 5 00:28:42 2017 > New Revision: 322073 > URL: https://svnweb.freebsd.org/changeset/base/322073 > > Log: > Fix matchcing of NATed ICMP queries (resolving NATed MTU discovery). > > MFC after: 1 month Obtained from: NetBSD r1.16 > > Modified: > head/sys/contrib/ipfilter/netinet/ip_nat.c > > Modified: head/sys/contrib/ipfilter/netinet/ip_nat.c > ============================================================================= > = > --- head/sys/contrib/ipfilter/netinet/ip_nat.c Fri Aug 4 23:34:39 201 > 7 (r322072) > +++ head/sys/contrib/ipfilter/netinet/ip_nat.c Sat Aug 5 00:28:42 201 > 7 (r322073) > @@ -4100,13 +4100,8 @@ ipf_nat_inlookup(fin, flags, p, src, mapdst) > dport = htons(fin->fin_data[1]); > break; > case IPPROTO_ICMP : > - if (flags & IPN_ICMPERR) { > - sport = fin->fin_data[1]; > - dport = 0; > - } else { > - dport = fin->fin_data[1]; > - sport = 0; > - } > + sport = 0; > + dport = fin->fin_data[1]; > break; > default : > sport = 0; > @@ -4426,8 +4421,6 @@ ipf_nat_outlookup(fin, flags, p, src, dst) > > ifp = fin->fin_ifp; > sflags = flags & IPN_TCPUDPICMP; > - sport = 0; > - dport = 0; > > switch (p) > { > @@ -4437,12 +4430,12 @@ ipf_nat_outlookup(fin, flags, p, src, dst) > dport = htons(fin->fin_data[1]); > break; > case IPPROTO_ICMP : > - if (flags & IPN_ICMPERR) > - sport = fin->fin_data[1]; > - else > - dport = fin->fin_data[1]; > + sport = 0; > + dport = fin->fin_data[1]; > break; > default : > + sport = 0; > + dport = 0; > break; > } > -- Cheers, Cy Schubert FreeBSD UNIX: Web: http://www.FreeBSD.org The need of the many outweighs the greed of the few.