Date: Sat, 6 Nov 2004 19:13:51 +0300 From: "Lenar D. Tukhvatullin" <blackv@netroad.ru> To: freebsd-net@freebsd.org Subject: bridging & vlan Message-ID: <20041106161351.GA90407@proxy.netroad.ru>
next in thread | raw e-mail | index | archive | help
System: FreeBSD 5.3-STABLE, cvsup'ed today.
I have bge0 interface and vlan0 configured on it:
-----
bge0: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> mtu 1500
options=1a<TXCSUM,VLAN_MTU,VLAN_HWTAGGING>
vlan0: flags=28943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> mtu 1500
vlan: 100 parent interface: bge0
----
I configure bridge between vlan0 and another physical interface (bge1),
but bridge does not work properly.
I can see incoming packets (packets from LAN with corresponding vlan tag)
with tcpdump on bge0, but can't see these packets on vlan0.
I think, it's a bug in sys/net/if_ethersubr.c in function ether_demux:
----
if (!(BDG_ACTIVE(ifp)) &&
!(ether_type == ETHERTYPE_VLAN && ifp->if_nvlans > 0)) {
----
This checks only 802.1Q incapsulated ethernet frames, but incoming packets
on bge0 contains normal, decapsulated packets (VLAN_HWTAGGING)
It is necessary to make additional check on incoming packet:
----
if (!(BDG_ACTIVE(ifp)) &&
!((ether_type == ETHERTYPE_VLAN || m_tag_locate(m, MTAG_VLAN, MTAG_VLAN_TAG, NULL) != NULL) && ifp->if_nvlans > 0)) {
----
I also submitted this problem as PR: kern/72933
--
Lenar D. Tukhvatullin
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20041106161351.GA90407>
