From owner-svn-src-head@freebsd.org Mon Mar 6 00:45:42 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 549DECF7C38; Mon, 6 Mar 2017 00:45:42 +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 0B3311D23; Mon, 6 Mar 2017 00:45:41 +0000 (UTC) (envelope-from cy.schubert@komquats.com) Received: from spqr.komquats.com ([96.50.22.10]) by shaw.ca with SMTP id kgmScJNguC3JIkgmTcRbyt; Sun, 05 Mar 2017 17:45:41 -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=447PbnccGau49XnNYn8A: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 CAC6A130; Sun, 5 Mar 2017 16:45:39 -0800 (PST) Received: from slippy (localhost [127.0.0.1]) by slippy.cwsent.com (8.15.2/8.15.2) with ESMTP id v260jdth017864; Sun, 5 Mar 2017 16:45:39 -0800 (PST) (envelope-from Cy.Schubert@cschubert.com) Message-Id: <201703060045.v260jdth017864@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: "Andrey V. Elsukov" cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r314718 - head/sys/netpfil/ipfw/nat64 In-Reply-To: Message from "Andrey V. Elsukov" of "Mon, 06 Mar 2017 00:41:59 +0000." <201703060041.v260fx8I056380@repo.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Sun, 05 Mar 2017 16:45:39 -0800 X-CMAE-Envelope: MS4wfPpGhEGyeKsQXNC5AQ3SKAfnGewNWdOw0Oa4T0abdjj62aF4LRFoIfZanvrOIBRZnYDabdHH+3bk5JJS7/Rquo6N735AntIM9t8mfdo8U7p9h2XBT78r AaDaksN4xeh0+sI3l0z0kio2ZL+mD0eL+/ncahdPLvpfOigZpsOhEF12xoneTt+MXt+EFgv85YzM8f7B7SsG22kNNAe94NICs5WZa5AoMbwhpA2wxEdxlWt8 FmLU/SlElIm0EDI/aGSGk2haQn2s8EVSO6r7QKXNUu0NQWPxsJA6cmPzWo0xUt/N 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: Mon, 06 Mar 2017 00:45:42 -0000 In message <201703060041.v260fx8I056380@repo.freebsd.org>, "Andrey V. Elsukov" writes: > Author: ae > Date: Mon Mar 6 00:41:59 2017 > New Revision: 314718 > URL: https://svnweb.freebsd.org/changeset/base/314718 > > Log: > Fix the build. Use new ipfw_lookup_table() in the nat64 too. > > Reported by: cy > MFC after: 2 weeks > > Modified: > head/sys/netpfil/ipfw/nat64/nat64stl.c > > Modified: head/sys/netpfil/ipfw/nat64/nat64stl.c > ============================================================================= > = > --- head/sys/netpfil/ipfw/nat64/nat64stl.c Sun Mar 5 23:59:04 2017 > (r314717) > +++ head/sys/netpfil/ipfw/nat64/nat64stl.c Mon Mar 6 00:41:59 2017 > (r314718) > @@ -184,7 +184,7 @@ nat64stl_handle_icmp6(struct ip_fw_chain > * 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); > @@ -204,6 +204,7 @@ ipfw_nat64stl(struct ip_fw_chain *chain, > { > ipfw_insn *icmd; > struct nat64stl_cfg *cfg; > + in_addr_t dst4; > uint32_t tablearg; > int ret; > > @@ -219,11 +220,12 @@ ipfw_nat64stl(struct ip_fw_chain *chain, > > switch (args->f_id.addr_type) { > case 4: > - ret = ipfw_lookup_table(chain, cfg->map46, > - htonl(args->f_id.dst_ip), &tablearg); > + dst4 = htonl(args->f_id.dst_ip); > + ret = ipfw_lookup_table(chain, cfg->map46, sizeof(in_addr_t), > + &dst4, &tablearg); > 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: > > Cool. Thanks. Better than my quick workaround before I leave the house.. -- Cheers, Cy Schubert FreeBSD UNIX: Web: http://www.FreeBSD.org The need of the many outweighs the greed of the few.