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:	6871de9363
This commit is contained in:
Gleb Smirnoff 2022-01-27 09:41:31 -08:00
parent f59fa11280
commit 6abb5043a6

View File

@ -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. */
}