freebsd-nq/sys
Bruce M Simpson 7059a5e0bd 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
..
amd64 Introduce some more SO_ option equivalents from Linux to FreeBSD. 2007-02-01 13:36:19 +00:00
arm Remove a bogus i = 0 2007-02-02 05:14:21 +00:00
boot o Wrap long lines. 2007-01-14 13:55:43 +00:00
bsm
cam Use the more specific 'EM732X' designation rather than * to disable sync 2007-01-23 17:29:31 +00:00
coda coda_vptofh is never defined nor used. 2007-02-02 15:47:28 +00:00
compat Remove extern int hz; use proper include file instead. 2007-02-02 08:58:16 +00:00
conf Remove MSDOSFS_LARGE compile time option. It has been converted 2007-01-30 05:01:06 +00:00
contrib Clean up pfr_kentry_pl2 as well. This fixes a kernel panic in the vm.zone 2007-01-01 16:51:11 +00:00
crypto Initialize T1 to silent gcc warning. 2006-10-22 02:19:33 +00:00
ddb Use FOREACH_PROC_IN_SYSTEM instead of using its unrolled form. 2007-01-17 15:05:52 +00:00
dev Add constants for the PCIY_VENDOR (vendor-specific), PCIY_DEBUG (EHCI 2007-02-02 19:48:25 +00:00
fs coda_vptofh is never defined nor used. 2007-02-02 15:47:28 +00:00
gdb
geom We expect 'bio_data != NULL' for BIO_{READ,WRITE,GETATTR}, but for 2007-01-28 23:36:07 +00:00
gnu Cylinder group bitmaps and blocks containing inode for a snapshot 2007-01-23 10:01:19 +00:00
i4b Fix fat-fingering in previous commit. 2006-12-29 16:38:22 +00:00
i386 Introduce some more SO_ option equivalents from Linux to FreeBSD. 2007-02-01 13:36:19 +00:00
ia64 Remove 3rd clause, renumber, ok per email 2007-01-12 07:26:21 +00:00
isa Cleaned up declaration and initialization of clock_lock. It is only 2007-01-23 08:01:20 +00:00
isofs/cd9660 The ISO9660 spec does allow files up to 4G. Change the i_size 2006-12-08 07:43:53 +00:00
kern Use int instead of u_int for the 'extra' argument to the 2007-02-02 22:27:45 +00:00
libkern
modules Reflecting the removal of MSDOSFS_LARGE found in sys/conf/files:1.1173. 2007-02-01 04:21:03 +00:00
net Drop unicast Ethernet frames not destined for the configured address 2007-02-03 02:57:45 +00:00
net80211 add IEEE80211_IS_CHAN_PASSIVE 2007-02-02 02:45:33 +00:00
netatalk Clean up DDP layer netatalk code: 2007-01-12 15:07:51 +00:00
netatm Sweep kernel replacing suser(9) calls with priv(9) calls, assigning 2006-11-06 13:42:10 +00:00
netgraph Quoting Alexander: 2007-02-02 09:45:23 +00:00
netinet Comply with RFC 3927, by forcing ARP replies which contain a source 2007-02-02 20:31:44 +00:00
netinet6 Revert nd6.c revs. 1.67, 1.68, 1.69, 1.70 in an attempt to unbreak 2007-01-26 23:22:58 +00:00
netipsec s,#if INET6,#ifdef INET6, 2006-12-14 17:33:46 +00:00
netipx Factor out UCB and my copyrights from copyrights of Mike Mitchell; 2007-01-08 22:14:00 +00:00
netkey
netnatm Factor out my copyrights + licenses from Charles D. Cranor and 2007-01-08 22:30:39 +00:00
netncp Sweep kernel replacing suser(9) calls with priv(9) calls, assigning 2006-11-06 13:42:10 +00:00
netsmb Sweep kernel replacing suser(9) calls with priv(9) calls, assigning 2006-11-06 13:42:10 +00:00
nfs NFSv4 client: 2006-11-28 19:33:28 +00:00
nfs4client Rename some functions and variables from nfs_* to nfs4_* to avoid 2007-01-25 14:33:13 +00:00
nfsclient Fix for a vnode lock leak in nfs_create() in the event of an error. 2007-01-31 23:10:27 +00:00
nfsserver The nfsm_srvpathsiz() macro in nfsrv_symlink() in nfs_serv.c should 2007-01-02 20:42:08 +00:00
opencrypto
pc98 MFi386: revision 1.647. 2007-01-28 07:19:14 +00:00
pccard
pci Change the remainder of the drivers for DMA'ing devices enabled in the 2007-01-21 19:32:51 +00:00
powerpc Remove stale header. 2007-01-26 04:58:31 +00:00
rpc
security When returning early from audit_arg_file() due to so->so_pcb being NULL 2007-01-06 22:28:28 +00:00
sparc64 Quiet GCC4 warnings regarding the width of printf()-arguments not 2007-01-20 17:14:12 +00:00
sun4v Add support for IPI_PREEMPT in order to enable use of the ULE scheduler 2007-02-02 05:00:21 +00:00
sys Use int instead of u_int for the 'extra' argument to the 2007-02-02 22:27:45 +00:00
tools
ufs Prevent quotactl calls that pass in an id of -1 from incorrectly 2007-02-01 02:13:53 +00:00
vm Fix for problems that occur when all mbuf clusters migrate to the mbuf packet 2007-01-25 01:05:23 +00:00
Makefile o Add cam to a list of cscope dirs. 2006-11-26 18:27:16 +00:00