Date: Mon, 3 May 2004 16:40:16 -0700 (PDT) From: Robert Watson <rwatson@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 52179 for review Message-ID: <200405032340.i43NeGpQ066388@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=52179 Change 52179 by rwatson@rwatson_tislabs on 2004/05/03 16:40:14 Simplify earlier modifications to use inpcbs instead of sockets in more places when labeling new mbufs. Remove comments justifying change and #if 0'd older code. Affected files ... .. //depot/projects/trustedbsd/mac/sys/netinet/raw_ip.c#34 edit .. //depot/projects/trustedbsd/mac/sys/netinet/tcp_output.c#24 edit .. //depot/projects/trustedbsd/mac/sys/netinet/tcp_subr.c#45 edit .. //depot/projects/trustedbsd/mac/sys/netinet/tcp_syncache.c#28 edit Differences ... ==== //depot/projects/trustedbsd/mac/sys/netinet/raw_ip.c#34 (text+ko) ==== @@ -247,21 +247,10 @@ struct inpcb *inp = sotoinpcb(so); int flags = (so->so_options & SO_DONTROUTE) | IP_ALLOWBROADCAST; - /* - * XXXRW: Due to use of inp fields later in this function, the - * inp lock almost certainly needs to be held for the duration - * of the function, not just the MAC entry point. - */ #ifdef MAC INP_LOCK(inp); mac_create_mbuf_from_inpcb(inp, m); INP_UNLOCK(inp); -#if 0 - /* - * XXXRW: Use inpcb instead. - */ - mac_create_mbuf_from_socket(so, m); -#endif #endif /* ==== //depot/projects/trustedbsd/mac/sys/netinet/tcp_output.c#24 (text+ko) ==== @@ -692,13 +692,7 @@ } m->m_pkthdr.rcvif = (struct ifnet *)0; #ifdef MAC - /* - * XXX: use mac_create_mbuf_from_inpcb(inp, m) instead of socket. - */ mac_create_mbuf_from_inpcb(tp->t_inpcb, m); -#if 0 - mac_create_mbuf_from_socket(so, m); -#endif #endif #ifdef INET6 if (isipv6) { ==== //depot/projects/trustedbsd/mac/sys/netinet/tcp_subr.c#45 (text+ko) ==== @@ -515,12 +515,6 @@ */ INP_LOCK_ASSERT(inp); mac_create_mbuf_from_inpcb(inp, m); -#if 0 - /* - * XXXRW: Use inpcb instead of socket here. - */ - mac_create_mbuf_from_socket(inp->inp_socket, m); -#endif } else { /* * Packet is not associated with a socket, so possibly ==== //depot/projects/trustedbsd/mac/sys/netinet/tcp_syncache.c#28 (text+ko) ==== @@ -1131,14 +1131,7 @@ inp = sc->sc_tp->t_inpcb; INP_LOCK(inp); #ifdef MAC - /* - * XXXRW: Should be mac_create_mbuf_from_inpcb(inp, m) rather than - * from socket for locking reasons. - */ mac_create_mbuf_from_inpcb(inp, m); -#if 0 - mac_create_mbuf_from_socket(inp->inp_socket, m); -#endif #endif #ifdef INET6
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200405032340.i43NeGpQ066388>