From owner-svn-src-all@freebsd.org Mon Mar 6 00:34:34 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 DC757CFAFD4; Mon, 6 Mar 2017 00:34:34 +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 92BC21E76; Mon, 6 Mar 2017 00:34:33 +0000 (UTC) (envelope-from cy.schubert@komquats.com) Received: from spqr.komquats.com ([96.50.22.10]) by shaw.ca with SMTP id kgbZcJKKzC3JIkgbacRa7j; Sun, 05 Mar 2017 17:34:26 -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=vAimRkpKBPmu871xdtAA: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 C44C7F0; Sun, 5 Mar 2017 16:34:24 -0800 (PST) Received: from slippy (localhost [127.0.0.1]) by slippy.cwsent.com (8.15.2/8.15.2) with ESMTP id v260YOaN028788; Sun, 5 Mar 2017 16:34:24 -0800 (PST) (envelope-from Cy.Schubert@cschubert.com) Message-Id: <201703060034.v260YOaN028788@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: r314716 - head/sys/netpfil/ipfw In-Reply-To: Message from "Andrey V. Elsukov" of "Sun, 05 Mar 2017 23:48:24 +0000." <201703052348.v25NmOI1032562@repo.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Sun, 05 Mar 2017 16:34:24 -0800 X-CMAE-Envelope: MS4wfNgFh8FyjcN0UilmoWq9IF6mqw04q+Grk908Uq5LQC4t0lytE2wq/ugp33Uz5L5q5Yl28gfwe0VAZeC5EXYCe4SpQl/CCkvDUM6RrCPBi/itDrzXjpCY Y8b3TqJbp/5IyTIPyoE9JY3HVkUMg+fbuIIcxr33hozPBpGuUVVyhkG2ndqAGslWIlyFhyw1+74FPyGCnxuGA5lXYwkLxVpWlKhCYxqXYY4c6C7+3iqYaIFN Vv+D7ctsy5LMGLCmwEti6ZTGyzBX3Ij1T6hAjQYp1Y0KpoEqpkqTnObj983V5Rhz 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:34:35 -0000 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() and > 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); 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.