Date: Thu, 4 Sep 2025 11:52:34 +0100 From: Lexi Winter <ivy@freebsd.org> To: Ronald Klop <ronald-lists@klop.ws> Cc: net@freebsd.org Subject: Re: bridge new vlan and iftagged "none" Message-ID: <aLlvcpTEz4oZVQEe@amaryllis.le-fay.org> In-Reply-To: <481902534.1074.1756977663370@localhost> References: <481902534.1074.1756977663370@localhost>
next in thread | previous in thread | raw e-mail | index | archive | help
--2TvblzbOFWlg7FoV Content-Type: multipart/mixed; boundary="ayt0ni7SbeveW9E2" Content-Disposition: inline --ayt0ni7SbeveW9E2 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline 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? --ayt0ni7SbeveW9E2 Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename=bridge-enqueue-filter.diff Content-Transfer-Encoding: quoted-printable 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); } =20 + /* 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 =3D m0) { m0 =3D m->m_nextpkt; --ayt0ni7SbeveW9E2-- --2TvblzbOFWlg7FoV Content-Type: application/pgp-signature; name=signature.asc -----BEGIN PGP SIGNATURE----- iHUEABYKAB0WIQSyjTg96lp3RifySyn1nT63mIK/YAUCaLlvbgAKCRD1nT63mIK/ YMhWAQD/38PJ+my7iupuMFohQz6S9krVrbd34W7w1QvSfgxjrwEA7AXnnjq+8SOe orzXeSI+EG8uOvENDCIZR0rBHAStqQM= =Qsay -----END PGP SIGNATURE----- --2TvblzbOFWlg7FoV--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?aLlvcpTEz4oZVQEe>