summaryrefslogtreecommitdiffstats
path: root/sys/netinet/udp_usrreq.c
diff options
context:
space:
mode:
authorrwatson <rwatson@FreeBSD.org>2004-05-04 02:11:47 +0000
committerrwatson <rwatson@FreeBSD.org>2004-05-04 02:11:47 +0000
commitff404935e298035e368a30eaca5828f456172f23 (patch)
treee48358fc77e63bf6505384209b672f020edf150b /sys/netinet/udp_usrreq.c
parente15e5d49773ef804bc0621274b3ea38a233fe00f (diff)
downloadFreeBSD-src-ff404935e298035e368a30eaca5828f456172f23.zip
FreeBSD-src-ff404935e298035e368a30eaca5828f456172f23.tar.gz
Switch to using the inpcb MAC label instead of socket MAC label when
labeling new mbufs created from sockets/inpcbs in IPv4. This helps avoid the need for socket layer locking in the lower level network paths where inpcb locks are already frequently held where needed. In particular: - Use the inpcb for label instead of socket in raw_append(). - Use the inpcb for label instead of socket in tcp_output(). - Use the inpcb for label instead of socket in tcp_respond(). - Use the inpcb for label instead of socket in tcp_twrespond(). - Use the inpcb for label instead of socket in syncache_respond(). While here, modify tcp_respond() to avoid assigning NULL to a stack variable and centralize assertions about the inpcb when inp is assigned. Obtained from: TrustedBSD Project Sponsored by: DARPA, McAfee Research
Diffstat (limited to 'sys/netinet/udp_usrreq.c')
-rw-r--r--sys/netinet/udp_usrreq.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/netinet/udp_usrreq.c b/sys/netinet/udp_usrreq.c
index 8680491..9c541db 100644
--- a/sys/netinet/udp_usrreq.c
+++ b/sys/netinet/udp_usrreq.c
@@ -728,7 +728,7 @@ udp_output(inp, m, addr, control, td)
INP_LOCK_ASSERT(inp);
#ifdef MAC
- mac_create_mbuf_from_socket(inp->inp_socket, m);
+ mac_create_mbuf_from_inpcb(inp, m);
#endif
if (len + sizeof(struct udpiphdr) > IP_MAXPACKET) {
OpenPOWER on IntegriCloud