Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 5 Mar 2007 17:56:47 +0300
From:      Eygene Ryabinkin <rea-fbsd@codelabs.ru>
To:        "Bruce M. Simpson" <bms@FreeBSD.org>
Cc:        rik@FreeBSD.org, freebsd-net@freebsd.org, glebius@FreeBSD.org, andre@FreeBSD.org, thompsa@FreeBSD.org
Subject:   Re: kern/109815: wrong interface identifier at pfil_hooks for vlans +	if_bridge
Message-ID:  <20070305145647.GT80319@codelabs.ru>
In-Reply-To: <45EB4915.1090703@FreeBSD.org>
References:  <E1HNbWw-000LoF-Bo@pobox.codelabs.ru> <45E9F1E8.2000802@inse.ru> <20070304062203.GL80319@codelabs.ru> <E1HNbWw-000LoF-Bo@pobox.codelabs.ru> <45E9F1E8.2000802@inse.ru> <20070304160613.GN80319@codelabs.ru> <45EB4915.1090703@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Bruce,

> >And a question: can anyone say if my patch will break some known
> >good behaviour and if the current behaviour of if_bridge is based
> >on some logic I am currently failing to understand.
> >  
> I would greatly appreciate it if you could look at the combined M_PROMISC and 
> 802.1p patch, which rewrites ether_input() significantly. It sounds like the 
> issues you are having with vlans and bridges may potentially be fixed by this 
> patch, or that the fix may be incorporated more easily with this patch.

Studied your patch as a patch, but not tried it on a live system.
I feel that your patch will not help in my situation, just because
my problem lies in the if_bridge.c::bridge_input() that is invoked
from if_ethersubr.c as BRIDGE_INPUT() macro. I see that your patch
sets some flags, tries to handle 802.1q packets, gives netgraph
a chance on the packet, but still passes the packet to BRIDGE_INPUT
just clearing the M_PROMISC bit. And all Bad Things in my case are
done in the bridge_input.

As my packets are going to the ether_input with VLAN tags stripped
by hardware and the if_bridge does not care about M_PROMISC I see
no theoretical difference if your patch will be applied.

Sure, I can test it, but then I need to know what problems are cured
by your patch, or I just should watch if it will not break something.

> In NetBSD, after if_bridge is given a chance to claim an input frame, the ifp 
> may be changed if the bridge needs to forward locally.

In my case if_bridge drops off the packet because firewall fails to
recognize the packet as good: the interface that is passed to a
pfil_hooks is bad (I mean not the one expected).

> M_PROMISC is used to 
> indicate that a frame was received promiscuously, in case ether_input() 
> re-enters itself with the same mbuf chain. Certain consumers of ether_input() 
> need to punch holes in the logic used to detect if a frame was for us or not 
> because they do funky things with Ethernet destination addresses, e.g. carp.

By the way: just grepped /sys/net and /sys/netinet on the 6-STABLE for
the M_PROMISC -- no hits. Are you talking about 6-STABLE or 7-CURRENT?
I have my issue on the 6-STABLE, but 7-CURRENT should also have it.
Will try to see if your patch makes any difference for the 7-CURRENT,
but I have no system at hand to test it, sorry.
-- 
Eygene



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20070305145647.GT80319>