From owner-svn-src-all@freebsd.org Mon Mar 6 00:41:38 2017 Return-Path: Delivered-To: svn-src-all@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 CD9F0CF7A23; Mon, 6 Mar 2017 00:41:38 +0000 (UTC) (envelope-from cy.schubert@komquats.com) Received: from smtp-out-so.shaw.ca (smtp-out-so.shaw.ca [64.59.136.139]) (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 8311D17E3; Mon, 6 Mar 2017 00:41:38 +0000 (UTC) (envelope-from cy.schubert@komquats.com) Received: from spqr.komquats.com ([96.50.22.10]) by shaw.ca with SMTP id kgiWcJMTJC3JIkgiXcRbIw; Sun, 05 Mar 2017 17:41:37 -0700 X-Authority-Analysis: v=2.2 cv=XbT59Mx5 c=1 sm=1 tr=0 a=jvE2nwUzI0ECrNeyr98KWA==:117 a=jvE2nwUzI0ECrNeyr98KWA==:17 a=kj9zAlcOel0A:10 a=6Iz7jQTuP9IA:10 a=6I5d2MoRAAAA:8 a=YxBL1-UpAAAA:8 a=VKfOjvUPJFuBEwFil5AA: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 4B70411A; Sun, 5 Mar 2017 16:41:36 -0800 (PST) Received: from slippy (localhost [127.0.0.1]) by slippy.cwsent.com (8.15.2/8.15.2) with ESMTP id v260fa9C078041; Sun, 5 Mar 2017 16:41:36 -0800 (PST) (envelope-from Cy.Schubert@cschubert.com) Message-Id: <201703060041.v260fa9C078041@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: "Andrey V. Elsukov" , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r314716 - head/sys/netpfil/ipfw In-Reply-To: Message from Cy Schubert of "Sun, 05 Mar 2017 16:34:24 -0800." Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Sun, 05 Mar 2017 16:41:36 -0800 X-CMAE-Envelope: MS4wfEgczR1RA/ynB+6Rvby5Kf5KaRYz5dbhyf4HqjeRxwbCSW/eEIRjdP+AMJj1c8WhVG9QEFt5VMBBlr89qZdx82V0XLdii7tTm7TFs7/NTaRil/iksJOc y0FVAjXqoz33HQb9wVqlXAqlfKWfKplt0KRY4GQtBLPjezLsyGIxNQPg6QufBSB/H2HolCv9b+W287gYNn++jQvb+TssTckOVn4QrOfuM3jBGYoIQMI8K/aq YM2SFVjFu2+B+lWZKnyu2aakWBuhMJ2hN8xs1nZQaQeieFQJuDSyzk/TrNyLg/cS X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Mar 2017 00:41:38 -0000 Cy Schubert writes: > In message <201703052348.v25NmOI1032562@repo.freebsd.org>, "Andrey V. > Elsukov" > writes: > > Author: ae > > Date: Sun Mar 5 23:48:24 2017 > > New Revision: 314716 > > URL: https://svnweb.freebsd.org/changeset/base/314716 > > > > Log: > > Add IPv6 support to O_IP_DST_LOOKUP opcode. > > > > o check the size of O_IP_SRC_LOOKUP opcode, it can not exceed the size of > > ipfw_insn_u32; > > o rename ipfw_lookup_table_extended() function into ipfw_lookup_table() a > nd > > remove old ipfw_lookup_table(); > > o use args->f_id.flow_id6 that is in host byte order to get DSCP value; > > o add SCTP ports support to 'lookup src/dst-port' opcode; > > o add IPv6 support to 'lookup src/dst-ip' opcode. > > > > PR: 217292 > > Reviewed by: melifaro > > MFC after: 2 weeks > > Sponsored by: Yandex LLC > > Differential Revision: https://reviews.freebsd.org/D9873 > > > > Modified: > > head/sys/netpfil/ipfw/ip_fw2.c > > head/sys/netpfil/ipfw/ip_fw_private.h > > head/sys/netpfil/ipfw/ip_fw_sockopt.c > > head/sys/netpfil/ipfw/ip_fw_table.c > > I seem to bad luck this week. This broke the build in a couple of places > next to each other. Does this look good? > > Index: nat64/nat64stl.c > =================================================================== > --- nat64/nat64stl.c (revision 314717) > +++ nat64/nat64stl.c (working copy) > @@ -184,7 +184,7 @@ > * IPv4 mapped address. > */ > ip6i = mtodo(m, hlen); > - if (ipfw_lookup_table_extended(chain, cfg->map64, > + if (ipfw_lookup_table(chain, cfg->map64, > sizeof(struct in6_addr), &ip6i->ip6_dst, &tablearg) == 0) { > m_freem(m); > return (NAT64RETURN); > @@ -220,10 +220,10 @@ > switch (args->f_id.addr_type) { > case 4: > ret = ipfw_lookup_table(chain, cfg->map46, > - htonl(args->f_id.dst_ip), &tablearg); > + sizeof(dst_ip), htonl(args->f_id.dst_ip), &tablearg); This should probably say sizeof(f_id.dst_ip). > break; > case 6: > - ret = ipfw_lookup_table_extended(chain, cfg->map64, > + ret = ipfw_lookup_table(chain, cfg->map64, > sizeof(struct in6_addr), &args->f_id.src_ip6, &tablearg); > break; > default: > -- Cheers, Cy Schubert FreeBSD UNIX: Web: http://www.FreeBSD.org The need of the many outweighs the greed of the few.