From owner-p4-projects Wed Jul 31 10:28:23 2002 Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 1CCE837B405; Wed, 31 Jul 2002 10:28:18 -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 B1CEA37B401 for ; Wed, 31 Jul 2002 10:28:17 -0700 (PDT) Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6265B43E5E for ; Wed, 31 Jul 2002 10:28:17 -0700 (PDT) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from freefall.freebsd.org (perforce@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.4/8.12.4) with ESMTP id g6VHSHJU009696 for ; Wed, 31 Jul 2002 10:28:17 -0700 (PDT) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: (from perforce@localhost) by freefall.freebsd.org (8.12.4/8.12.4/Submit) id g6VHSHXA009693 for perforce@freebsd.org; Wed, 31 Jul 2002 10:28:17 -0700 (PDT) Date: Wed, 31 Jul 2002 10:28:17 -0700 (PDT) Message-Id: <200207311728.g6VHSHXA009693@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: perforce set sender to bb+lists.freebsd.perforce@cyrus.watson.org using -f From: Robert Watson Subject: PERFORCE change 15328 for review To: Perforce Change Reviews Sender: owner-p4-projects@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG http://people.freebsd.org/~peter/p4db/chv.cgi?CH=15328 Change 15328 by rwatson@rwatson_tislabs on 2002/07/31 10:28:15 Change the logic for IPsec and MAC policy composition a little so that it looks a bit more like the existing logic. Fix a bug wherein n might be freed but not nulled (possibly not possible). Affected files ... .. //depot/projects/trustedbsd/mac/sys/netinet/raw_ip.c#15 edit Differences ... ==== //depot/projects/trustedbsd/mac/sys/netinet/raw_ip.c#15 (text+ko) ==== @@ -145,10 +145,9 @@ continue; if (last) { struct mbuf *n = m_copy(m, 0, (int)M_COPYALL); - int policyfail; + int policyfail = 0; if (n != NULL) { - policyfail = 0; #ifdef IPSSEC /* check AH/ESP integrity. */ if (ipsec4_in_reject_so(n, last->inp_socket)) { @@ -163,10 +162,10 @@ n) != 0) policyfail = 1; #endif - if (policyfail) - m_freem(n); } - if (n) { + if (policyfail) + m_freem(n); + else if (n) { if (last->inp_flags & INP_CONTROLOPTS || last->inp_socket->so_options & SO_TIMESTAMP) ip_savecontrol(last, &opts, ip, n); To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe p4-projects" in the body of the message