bms cb84e5a9bd Drop unicast Ethernet frames not destined for the configured address
of a tap(4) instance, if IFF_PROMISC is not set.

In tap(4), we should emulate the effect IFF_PROMISC would have on
hardware, otherwise we risk introducing layer 2 loops if tap(4) is
used with bridges. This means not even bpf(4) gets to see them.

This patch has been tested in a variety of situations. Multicast and
broadcast frames are correctly allowed through. I have observed this
behaviour causing problems with multiple QEMU instances hosted on
the same FreeBSD machine.

The checks in in ether_demux() [if_ethersubr.c, rev 1.222, line 638]
are insufficient to prevent this bug from occurring, as ifp->if_vlantrunk
will always be NULL for the non-vlan case.

MFC after:	3 weeks
PR:		86429
Submitted by:	Pieter de Boer (with changes)
2007-02-03 02:57:45 +00:00
..
2007-02-02 05:14:21 +00:00
2007-01-14 13:55:43 +00:00
2007-02-02 15:47:28 +00:00
2006-12-29 16:38:22 +00:00
2007-02-02 02:45:33 +00:00
2007-02-02 09:45:23 +00:00
2006-12-14 17:33:46 +00:00
2006-11-28 19:33:28 +00:00
2007-01-28 07:19:14 +00:00
2007-01-26 04:58:31 +00:00
2006-11-26 18:27:16 +00:00