From owner-freebsd-bugs@FreeBSD.ORG Wed Apr 28 00:10:22 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 EAABE16A4CE for ; Wed, 28 Apr 2004 00:10:22 -0700 (PDT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id E361543D54 for ; Wed, 28 Apr 2004 00:10:22 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) i3S7AM8w039536 for ; Wed, 28 Apr 2004 00:10:22 -0700 (PDT) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.11/8.12.11/Submit) id i3S7AMk8039533; Wed, 28 Apr 2004 00:10:22 -0700 (PDT) (envelope-from gnats) Date: Wed, 28 Apr 2004 00:10:22 -0700 (PDT) Message-Id: <200404280710.i3S7AMk8039533@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org From: Gleb Smirnoff 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: Gleb Smirnoff List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Apr 2004 07:10:23 -0000 The following reply was made to PR kern/63317; it has been noted by GNATS. From: Gleb Smirnoff To: Archie Cobbs Cc: 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: Wed, 28 Apr 2004 11:00:42 +0400 On Tue, Apr 27, 2004 at 09:18:58AM -0500, Archie Cobbs wrote: A> > It is said in current manpage, that ng_ether sends all packets to lower, A> > however code reveals the truth. Here is a sniplet from ng_ether_input_orphan(), A> > which is a hook called by ethernet stack: A> > A> > /* If "orphan" hook not connected, let packet continue */ A> > if (priv->lower == NULL || !priv->lowerOrphan) { A> > m_freem(m); A> > return; A> > } A> A> What is your point? This function is only called for orphan packets. A> In the current code, if the 'lower' hook is connected, this function will A> never be called (all packets will get sent to 'lower') (note: in the current A> code, 'priv->lower' is used for both 'lower' and 'orphans' hooks). Yes, you are right. I've looked into if_ethersubr.c and understood this. Sorry. I have repeated my experiment, and it showed that all packets are received on lower. Yesterday it was a coincidence, that no IPX packet broadcasted during a minute. A> > A> To preserve the existing behavior, the node would need to duplicate A> > A> the orphanable packets and send them to BOTH connected hooks. What about this behavoir? - if lower is connected, send ALL packets to it (like now) - if orphans is connected send orphaned packets to it (like now) - if both are connected, send non-orphaned to lower and orphaned to orphans Since, the third option is not available now at all, we won't break any current configurations. -- Totus tuus, Glebius. GLEBIUS-RIPN GLEB-RIPE