[Bug 292759] [igb] vlanhwfilter silently does not work with bridge with VLANs

[email protected]
Newsgroups gmane.os.freebsd.devel.net
Message-ID <[email protected]/bugzilla/>
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=292759

Aleksandr Fedorov <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[email protected]

--- Comment #5 from Aleksandr Fedorov <[email protected]> ---
(In reply to Zhenlei Huang from comment #3)

The main problem is that the bridge doesn't set or inherit the VLAN_MTU flag.
Therefore, the VLAN driver lowers the MTU because it believes the parent
interface can't send packets with an MTU of 1500.

Quick and dirty patch, fixes the problem:

diff --git a/sys/net/if_bridge.c b/sys/net/if_bridge.c
index 9a468a8eb462..fe24991ad84f 100644
--- a/sys/net/if_bridge.c
+++ b/sys/net/if_bridge.c
@@ -871,7 +871,7 @@ bridge_clone_create(struct if_clone *ifc, char *name,
size_t len,
        ifp->if_softc = sc;
        if_initname(ifp, bridge_name, ifd->unit);
        ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST;
-       ifp->if_capabilities = ifp->if_capenable = IFCAP_VLAN_HWTAGGING;
+       ifp->if_capabilities = ifp->if_capenable = IFCAP_VLAN_HWTAGGING |
IFCAP_VLAN_MTU;
        ifp->if_ioctl = bridge_ioctl;
 #ifdef ALTQ
        ifp->if_start = bridge_altq_start;

# ifconfig bridge1 create mtu 1500 up
# ifconfig bridge1.1 create up
# ifconfig bridge1.1
bridge1.1: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
        options=0
        ether 58:9c:fc:10:05:32
        groups: vlan
        vlan: 1 vlanproto: 802.1q vlanpcp: 0 parent interface: bridge1
        nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
root@xenon:/home/XeNoN # ifconfig bridge1
bridge1: flags=1008843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST,LOWER_UP> metric
0 mtu 1500
        options=18<VLAN_MTU,VLAN_HWTAGGING>
        ether 58:9c:fc:10:05:32
        id 00:00:00:00:00:00 priority 32768 hellotime 2 fwddelay 15
        maxage 20 holdcnt 6 proto rstp maxaddr 2000 timeout 1200
        root id 00:00:00:00:00:00 priority 32768 ifcost 0 port 0
        bridge flags=0<>
        groups: bridge
        nd6 options=9<PERFORMNUD,IFDISABLED>

-- 
You are receiving this mail because:
You are the assignee for the bug.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.