Re: promisc/netgraph question

Gleb Smirnoff <[email protected]>
Newsgroups gmane.os.freebsd.devel.net
Message-ID <[email protected]>
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
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.