Back in 7/2006, we fixed an issue with the pkttype match mismatching on locally generated packets.[1] At the time, I didn't test the fix in the OUTPUT chain, but only in the INPUT chain, where packets showed up as PACKET_LOOPBACK. Unfortunately, when packets are output, they aren't tagged as PACKET_LOOPBACK so the fix was incomplete. Below is another attempt at fixing the problem in all cases, and fixes the original netfilter bugzilla #484 as well as a new bug submission (which I can't get the number of since bugzilla is presently down). The fix is somewhat complicated because when broadcast packets hit the OUTPUT chain they have no destination MAC attached, so the "simple" test for 'all FF' doesn't work for us, and instead we have to consult the routing table. One other note: since IPv6 doesn't have the concept of "broadcast", perhaps the userspace extension shouldn't allow broadcast rules to be added for that family? Phil Signed-off-by: Phil Oester [1] http://marc.info/?l=netfilter-devel&m=115318495708540&w=2