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
_______________________________________________
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-net
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to