From owner-freebsd-bugs@FreeBSD.ORG Tue Apr 27 08:00:26 2004 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 28E6116A4D0 for ; Tue, 27 Apr 2004 08:00:26 -0700 (PDT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0739743D67 for ; Tue, 27 Apr 2004 08:00:26 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) i3RF0PE8012883 for ; Tue, 27 Apr 2004 08:00:25 -0700 (PDT) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.11/8.12.11/Submit) id i3RF0PY2012882; Tue, 27 Apr 2004 08:00:25 -0700 (PDT) (envelope-from gnats) Date: Tue, 27 Apr 2004 08:00:25 -0700 (PDT) Message-Id: <200404271500.i3RF0PY2012882@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org From: Archie Cobbs Subject: Re: kern/63317: make ng_ether(4) support "lower" and "orphans"simultaneously X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Archie Cobbs List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Apr 2004 15:00:26 -0000 The following reply was made to PR kern/63317; it has been noted by GNATS. From: Archie Cobbs To: Gleb Smirnoff Cc: Archie Cobbs , Maxim Konovalov , bzeeb-lists@lists.zabbadoz.net, FreeBSD-gnats-submit@FreeBSD.ORG Subject: Re: kern/63317: make ng_ether(4) support "lower" and "orphans"simultaneously Date: Tue, 27 Apr 2004 09:18:58 -0500 (CDT) Gleb Smirnoff wrote: > A> OK, then this is a change in semantics: whereas before, connecting > A> to lower meant always getting all packets, now connecting to lower > A> means always getting all packets UNLESS somebody else is connected > A> to orphans... could be a completely different and unknown process. > > It is said in current manpage, that ng_ether sends all packets to lower, > however code reveals the truth. Here is a sniplet from ng_ether_input_orphan(), > which is a hook called by ethernet stack: > > /* If "orphan" hook not connected, let packet continue */ > if (priv->lower == NULL || !priv->lowerOrphan) { > m_freem(m); > return; > } What is your point? This function is only called for orphan packets. In the current code, if the 'lower' hook is connected, this function will never be called (all packets will get sent to 'lower') (note: in the current code, 'priv->lower' is used for both 'lower' and 'orphans' hooks). > To make sure, I've made an experiment. I have a notebook in a network where many IPX > broadcasts live. So I typed: > > + mkpeer fxp0: etf lower downstream > + name fxp0:lower etf > + connect etf: dummy ipx > + msg etf: setfilter { matchhook="ipx" ethertype=0x8137 } > > I've waited for half a minute, and no packets arrived. Then, I've typed: Is this with your modified node? If so, then it demonstrates how you have changed the semantics. You should see ALL packets on the 'lower' hook. This has been working fine for years in the current code. Try a simpler experiment: "connect fxp0: dummy lower" and you should see ALL packets, including IPX packets. > A> To preserve the existing behavior, the node would need to duplicate > A> the orphanable packets and send them to BOTH connected hooks. > > So behavior didn't change. Even we have found some inexactitude in > manpage. The current behavior is: if node X is connected to 'lower', then ALL packets received from the hardware are delivered to node X. It appears you have changed this (?) -Archie __________________________________________________________________________ Archie Cobbs * CTO, Awarix * http://www.awarix.com