kern/109815: wrong interface identifier at pfil_hooks for vlans
rea-fbsd at codelabs.ru
Mon Mar 5 14:56:55 UTC 2007
> >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.
More information about the freebsd-net