Date: Wed, 28 Apr 2004 00:10:22 -0700 (PDT) From: Gleb Smirnoff <glebius@cell.sick.ru> To: freebsd-bugs@FreeBSD.org Subject: Re: kern/63317: make ng_ether(4) support "lower" and "orphans"simultaneously Message-ID: <200404280710.i3S7AMk8039533@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR kern/63317; it has been noted by GNATS.
From: Gleb Smirnoff <glebius@cell.sick.ru>
To: Archie Cobbs <archie@dellroad.org>
Cc: Maxim Konovalov <maxim@macomnet.ru>,
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200404280710.i3S7AMk8039533>
