Date: Mon, 2 Feb 2026 09:27:52 -0800 From: Gleb Smirnoff <glebius@freebsd.org> To: Zhenlei Huang <zlei@freebsd.org> Cc: Martin Mayer <martin.mayer@m2-it-solutions.de>, Vadim Goncharov <vadimnuclight@gmail.com>, "freebsd-net@freebsd.org" <freebsd-net@freebsd.org> Subject: Re: promisc/netgraph question Message-ID: <aYDemGI4X7CeifE7@cell.glebi.us> In-Reply-To: <BFA9B02C-7B09-42D5-8DD4-381BA276B68A@FreeBSD.org> References: <FR2PPF447E0FD2F4AB3B97FDEBCB7FC5404BC9FA@FR2PPF447E0FD2F.DEUP281.PROD.OUTLOOK.COM> <FR2PPF447E0FD2FA1F4CFD7A4DF76B5DDD1BC9FA@FR2PPF447E0FD2F.DEUP281.PROD.OUTLOOK.COM> <20260130234931.073ec5df@nuclight.lan> <FR2PPF447E0FD2FF81BF6D4A7538B0D0894BC9CA@FR2PPF447E0FD2F.DEUP281.PROD.OUTLOOK.COM> <BFA9B02C-7B09-42D5-8DD4-381BA276B68A@FreeBSD.org>
index | next in thread | previous in thread | raw e-mail
On Mon, Feb 02, 2026 at 12:58:05PM +0800, Zhenlei Huang wrote:
Z> > [...]
Z> > /* Allow ng_ether(4) to claim this frame. */
Z> > if (ifp->if_l2com != NULL) {
Z> > KASSERT(ng_ether_input_p != NULL,
Z> > ("%s: ng_ether_input_p is NULL", __func__));
Z> > m->m_flags &= ~M_PROMISC;
Z> > (*ng_ether_input_p)(ifp, &m);
Z> > if (m == NULL) {
Z> > CURVNET_RESTORE();
Z> > return;
Z> > }
Z> > eh = mtod(m, struct ether_header *);
Z> > }
We should just restore M_PROMISC in case if netgraph did not consume the packet
in the quoted above block. bridge(4) handling has the same bug. I don't know
though if bridge(4) can refuse to consume the packet.
--
Gleb Smirnoff
home |
help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?aYDemGI4X7CeifE7>
