PERFORCE change 52179 for review

Robert Watson rwatson at FreeBSD.org
Mon May 3 23:40:16 GMT 2004


http://perforce.freebsd.org/chv.cgi?CH=52179

Change 52179 by rwatson at 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
To Unsubscribe: send mail to majordomo at trustedbsd.org
with "unsubscribe trustedbsd-cvs" in the body of the message



More information about the trustedbsd-cvs mailing list