Re: bridge new vlan and iftagged "none"

Lexi Winter <[email protected]>
Newsgroups gmane.os.freebsd.devel.net
Message-ID <[email protected]>
hi Roland,

Ronald Klop:
>        member: epair4a flags=143<LEARNING,DISCOVER,AUTOEDGE,AUTOPTP>
>                port 15 priority 128 path cost 2000 vlan protocol 802.1q

based on this configuration, epair4a should neither accept nor send any
traffic.

> epair4a still receives all traffic, so also traffic for vlan 3.

however, it seems like there's an issue filtering outgoing traffic from
the host itself.  could you please try the attached patch and see if it
makes any difference?
bridge-enqueue-filter.diff (text/x-diff, 477 B)
diff --git a/sys/net/if_bridge.c b/sys/net/if_bridge.c
index a854bbb96394..212c8622a1c8 100644
--- a/sys/net/if_bridge.c
+++ b/sys/net/if_bridge.c
@@ -2398,6 +2398,12 @@ bridge_enqueue(struct bridge_softc *sc, struct ifnet *dst_ifp, struct mbuf *m,
 		return (EINVAL);
 	}
 
+	/* Do VLAN filtering. */
+	if (!bridge_vfilter_out(bif, m)) {
+		m_freem(m);
+		return (0);
+	}
+
 	/* We may be sending a fragment so traverse the mbuf */
 	for (; m; m = m0) {
 		m0 = m->m_nextpkt;
signature.asc (application/pgp-signature, 228 B)
-----BEGIN PGP SIGNATURE-----

iHUEABYKAB0WIQSyjTg96lp3RifySyn1nT63mIK/YAUCaLlvbgAKCRD1nT63mIK/
YMhWAQD/38PJ+my7iupuMFohQz6S9krVrbd34W7w1QvSfgxjrwEA7AXnnjq+8SOe
orzXeSI+EG8uOvENDCIZR0rBHAStqQM=
=Qsay
-----END PGP SIGNATURE-----
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.