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