From owner-cvs-all@FreeBSD.ORG Sat Feb 3 02:57:46 2007 Return-Path: X-Original-To: cvs-all@FreeBSD.org Delivered-To: cvs-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E334416A40E; Sat, 3 Feb 2007 02:57:46 +0000 (UTC) (envelope-from bms@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [69.147.83.41]) by mx1.freebsd.org (Postfix) with ESMTP id 7361813C48D; Sat, 3 Feb 2007 02:57:46 +0000 (UTC) (envelope-from bms@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id l132vkeM089440; Sat, 3 Feb 2007 02:57:46 GMT (envelope-from bms@repoman.freebsd.org) Received: (from bms@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id l132vkfT089439; Sat, 3 Feb 2007 02:57:46 GMT (envelope-from bms) Message-Id: <200702030257.l132vkfT089439@repoman.freebsd.org> From: Bruce M Simpson Date: Sat, 3 Feb 2007 02:57:46 +0000 (UTC) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Cc: Subject: cvs commit: src/sys/net if_tap.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Feb 2007 02:57:47 -0000 bms 2007-02-03 02:57:46 UTC FreeBSD src repository Modified files: sys/net if_tap.c Log: 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) Revision Changes Path 1.68 +18 -0 src/sys/net/if_tap.c