From 6abb5043a67acb8604f600ef7620bea61dde249f Mon Sep 17 00:00:00 2001 From: Gleb Smirnoff Date: Thu, 27 Jan 2022 09:41:31 -0800 Subject: [PATCH] rtsock: always set m_pkthdr.rcvif when queueing on netisr netisr uses global workstreams and after dequeueing an mbuf it uses rcvif to get the VNET of the mbuf. Of course, this is not needed when kernel is compiled without VIMAGE. It came out that routing socket does not set rcvif if compiled without VIMAGE. Make this assignment not depending on VIMAGE option. Fixes: 6871de9363e5 --- sys/net/rtsock.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/sys/net/rtsock.c b/sys/net/rtsock.c index 9ab07b374ea..c5f842de2b7 100644 --- a/sys/net/rtsock.c +++ b/sys/net/rtsock.c @@ -2169,14 +2169,12 @@ rt_dispatch(struct mbuf *m, sa_family_t saf) *(unsigned short *)(tag + 1) = saf; m_tag_prepend(m, tag); } -#ifdef VIMAGE if (V_loif) m->m_pkthdr.rcvif = V_loif; else { m_freem(m); return; } -#endif netisr_queue(NETISR_ROUTE, m); /* mbuf is free'd on failure. */ }