From owner-freebsd-net@FreeBSD.ORG Mon Jun 10 13:58:21 2013 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 12DC9F83; Mon, 10 Jun 2013 13:58:21 +0000 (UTC) (envelope-from luigi@onelab2.iet.unipi.it) Received: from onelab2.iet.unipi.it (onelab2.iet.unipi.it [131.114.59.238]) by mx1.freebsd.org (Postfix) with ESMTP id CC5C219CC; Mon, 10 Jun 2013 13:58:20 +0000 (UTC) Received: by onelab2.iet.unipi.it (Postfix, from userid 275) id 71A8C7300A; Mon, 10 Jun 2013 16:01:17 +0200 (CEST) Date: Mon, 10 Jun 2013 16:01:17 +0200 From: Luigi Rizzo To: Ermal Lu?i Subject: Re: [PATCH] dummynet(4) patch for pf(4) Message-ID: <20130610140117.GA98967@onelab2.iet.unipi.it> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.20 (2009-06-14) Cc: freebsd-net , "freebsd-pf@freebsd.org" X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Jun 2013 13:58:21 -0000 On Mon, Jun 10, 2013 at 03:45:01PM +0200, Ermal Lu?i wrote: > Hello, > > the patch at location [1] implements support for dummynet into pf(4). > > The patch has been tested and confirmed working without issues into pfSense. > > Any objections to integrating this into FreeBSD? for the dummynet/ipfw part i have no objection -- this is only a one-line change to sys/netpfil/ipfw/ip_dn_io.c For the pf part sys/netpfil/pf/pf.c, there are two huge macros PACKET_UNDO_NAT() and PACKET_REDO_NAT() which really look ugly. It would really make sense to change them into functions (they already do some substantial work so the saving of one function call is negligible). There is also some questionable indentation see the calls to m_copyback() in PACKET_REDO_NAT() Some extra braces around if/else blocks would help immensely. cheers luigi > [1] > https://github.com/pfsense/pfsense-tools/blob/master/patches/RELENG_10_0/dummynet.RELENG_10.diff > > -- > Ermal > _______________________________________________ > freebsd-net@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-net > To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org"