From owner-p4-projects@FreeBSD.ORG Mon May 3 16:40:17 2004 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id CA2B516A4DD; Mon, 3 May 2004 16:40:17 -0700 (PDT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A4B4216A4D5 for ; Mon, 3 May 2004 16:40:17 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 60E4F43D41 for ; Mon, 3 May 2004 16:40:17 -0700 (PDT) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.10/8.12.10) with ESMTP id i43NeHGe066391 for ; Mon, 3 May 2004 16:40:17 -0700 (PDT) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.10/8.12.10/Submit) id i43NeGpQ066388 for perforce@freebsd.org; Mon, 3 May 2004 16:40:16 -0700 (PDT) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Date: Mon, 3 May 2004 16:40:16 -0700 (PDT) Message-Id: <200405032340.i43NeGpQ066388@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to bb+lists.freebsd.perforce@cyrus.watson.org using -f From: Robert Watson To: Perforce Change Reviews Subject: PERFORCE change 52179 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 May 2004 23:40:18 -0000 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