Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 10 Jun 2013 16:01:17 +0200
From:      Luigi Rizzo <rizzo@iet.unipi.it>
To:        Ermal Lu?i <eri@freebsd.org>
Cc:        freebsd-net <freebsd-net@freebsd.org>, "freebsd-pf@freebsd.org" <freebsd-pf@freebsd.org>
Subject:   Re: [PATCH] dummynet(4) patch for pf(4)
Message-ID:  <20130610140117.GA98967@onelab2.iet.unipi.it>
In-Reply-To: <CAPBZQG3YttL7nj3XZ_UCoK=h8LzwjQfPv37XOhv87qx0WGjeAA@mail.gmail.com>
References:  <CAPBZQG3YttL7nj3XZ_UCoK=h8LzwjQfPv37XOhv87qx0WGjeAA@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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"



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20130610140117.GA98967>