From owner-freebsd-current@FreeBSD.ORG Mon Jan 30 18:51:09 2006 Return-Path: X-Original-To: freebsd-current@freebsd.org Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0DC0C16A420 for ; Mon, 30 Jan 2006 18:51:09 +0000 (GMT) (envelope-from yar@comp.chem.msu.su) Received: from comp.chem.msu.su (comp.chem.msu.su [158.250.32.97]) by mx1.FreeBSD.org (Postfix) with ESMTP id D0EF643D48 for ; Mon, 30 Jan 2006 18:50:58 +0000 (GMT) (envelope-from yar@comp.chem.msu.su) Received: from comp.chem.msu.su (localhost [127.0.0.1]) by comp.chem.msu.su (8.13.3/8.13.3) with ESMTP id k0UIoiHA010656; Mon, 30 Jan 2006 21:50:45 +0300 (MSK) (envelope-from yar@comp.chem.msu.su) Received: (from yar@localhost) by comp.chem.msu.su (8.13.3/8.13.3/Submit) id k0UIog2e010653; Mon, 30 Jan 2006 21:50:42 +0300 (MSK) (envelope-from yar) Date: Mon, 30 Jan 2006 21:50:41 +0300 From: Yar Tikhiy To: Gregory Nou Message-ID: <20060130185041.GF72743@comp.chem.msu.su> References: <43DA1672.1080609@altern.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <43DA1672.1080609@altern.org> User-Agent: Mutt/1.5.9i Cc: freebsd-current@freebsd.org Subject: Re: Question on IFF_PPROMISC (and IFF_PROMISC) X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Jan 2006 18:51:09 -0000 On Fri, Jan 27, 2006 at 01:47:46PM +0100, Gregory Nou wrote: > > I found a (somewhat old) post from gnn@ on this topic there : > http://unix.derkeiler.com/Mailing-Lists/FreeBSD/net/2004-09/0289.html > > I also think that it would be a good idea to do it (at least, it would > be easier to understand, because IFF_PPROMISC is not that explicit). If > nobody has already done it, I'll work on this. > > There is another point on which I would appreciate to know your opinion: > referring to if.c[1269], I understand that if IFF_PPROMISC is set in > ifp->if_flags, IFF_PROMISC should be set to (or we are in a transient > situation). > It appears that if_ethersubr.c[652] is working in this case. Isn't it a > mistake ? IMHO there's little point in changing the identifier's name. That will do more harm than good. The existing code looks correct to me. if_ethersubr.c:652 drops a frame not addressed to us only if IFF_PROMISC is set, but IFF_PPROMISC is not set. The point is that if IFF_PPROMISC is set, the frame will be passed up to IP or whatever anyway. -- Yar