[PATCH] dummynet(4) patch for pf(4)

Luigi Rizzo rizzo at iet.unipi.it
Mon Jun 10 13:58:21 UTC 2013


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 at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-net
> To unsubscribe, send any mail to "freebsd-net-unsubscribe at freebsd.org"


More information about the freebsd-pf mailing list