Luigi Rizzo 4b9840932d Add ipfw hooks to ether_demux() and ether_output_frame().
Ipfw processing of frames at layer 2 can be enabled by the sysctl variable

	net.link.ether.ipfw=1

Consider this feature experimental, because right now, the firewall
is invoked in the places indicated below, and controlled by the
sysctl variables listed on the right.  As a consequence, a packet
can be filtered from 1 to 4 times depending on the path it follows,
which might make a ruleset a bit hard to follow.

I will add an ipfw option to tell if we want a given rule to apply
to ether_demux() and ether_output_frame(), but we have run out of
flags in the struct ip_fw so i need to think a bit on how to implement
this.

		to upper layers
	     |			     |
	     +----------->-----------+
	     ^			     V
	[ip_input]		[ip_output]	net.inet.ip.fw.enable=1
	     |			     |
	     ^			     V
	[ether_demux]      [ether_output_frame]	net.link.ether.ipfw=1
	     |			     |
	     +->- [bdg_forward]-->---+		net.link.ether.bridge_ipfw=1
	     ^			     V
	     |			     |
		 to devices
2002-05-13 10:37:19 +00:00
..
2002-05-01 20:44:46 +00:00
2002-05-01 20:44:46 +00:00
2002-05-06 16:28:25 +00:00
2002-03-19 21:25:46 +00:00
2002-03-19 21:25:46 +00:00
2002-03-19 21:25:46 +00:00
2002-05-12 00:22:38 +00:00
2002-03-19 21:25:46 +00:00
2002-03-19 21:25:46 +00:00
2002-03-19 21:25:46 +00:00
2002-03-19 21:25:46 +00:00
2001-06-11 12:39:29 +00:00
2002-04-11 02:14:21 +00:00
2002-03-19 21:25:46 +00:00
2002-03-19 21:25:46 +00:00
2001-11-04 17:35:31 +00:00
2002-03-19 21:25:46 +00:00
2002-03-19 21:25:46 +00:00
2002-05-12 00:22:38 +00:00
2002-03-19 21:25:46 +00:00
2002-03-19 21:25:46 +00:00
2001-09-12 08:38:13 +00:00
2002-05-01 20:44:46 +00:00
2002-05-01 20:44:46 +00:00
2002-03-19 21:25:46 +00:00
2002-03-19 21:25:46 +00:00
2001-02-26 20:10:16 +00:00
2002-03-19 21:25:46 +00:00