git: 6abb5043a67a - main - rtsock: always set m_pkthdr.rcvif when queueing on netisr
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 27 Jan 2022 17:42:32 UTC
The branch main has been updated by glebius:
URL: https://cgit.FreeBSD.org/src/commit/?id=6abb5043a67acb8604f600ef7620bea61dde249f
commit 6abb5043a67acb8604f600ef7620bea61dde249f
Author: Gleb Smirnoff <glebius@FreeBSD.org>
AuthorDate: 2022-01-27 17:41:31 +0000
Commit: Gleb Smirnoff <glebius@FreeBSD.org>
CommitDate: 2022-01-27 17:41:31 +0000
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 9ab07b374ea2..c5f842de2b7e 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. */
}