[Bug 240106] VNET issue with ARP and routing sockets in jails

From: <bugzilla-noreply_at_freebsd.org>
Date: Wed, 30 Mar 2022 15:32:39 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=240106

--- Comment #13 from Kristof Provost <kp@freebsd.org> ---
(In reply to Bjoern A. Zeeb from comment #12)
Note that the issue described in #10 is a configuration problem more than a
bug.

In this configuration the bridge will grab all packets, including those with a
vlan tag and nothing will be passed to the vlan interfaces. That's expected.
After all, the system has been configured to bridge all packets arriving on em0
to the members of vm-sw1, and that includes those with ETHERTYPE_VLAN.

This patch should make it do what the user wants, but I'm not convinced that's
actually appropriate:

diff --git a/sys/net/if_bridge.c b/sys/net/if_bridge.c
index 12c807fe2009..98c79764bc69 100644
--- a/sys/net/if_bridge.c
+++ b/sys/net/if_bridge.c
@@ -2467,6 +2467,11 @@ bridge_input(struct ifnet *ifp, struct mbuf *m)

        eh = mtod(m, struct ether_header *);

+       if (ntohs(eh->ether_type) == ETHERTYPE_VLAN ||
+           ntohs(eh->ether_type) == ETHERTYPE_QINQ) {
+               return (m);
+       }
+
        bridge_span(sc, m);

        if (m->m_flags & (M_BCAST|M_MCAST)) {

-- 
You are receiving this mail because:
You are the assignee for the bug.