kern/63317: make ng_ether(4) support "lower" and
"orphans"simultaneously
Gleb Smirnoff
glebius at cell.sick.ru
Wed Apr 28 00:10:23 PDT 2004
The following reply was made to PR kern/63317; it has been noted by GNATS.
From: Gleb Smirnoff <glebius at cell.sick.ru>
To: Archie Cobbs <archie at dellroad.org>
Cc: Maxim Konovalov <maxim at macomnet.ru>,
bzeeb-lists at lists.zabbadoz.net, FreeBSD-gnats-submit at 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
More information about the freebsd-bugs
mailing list