From owner-p4-projects@FreeBSD.ORG Thu Jul 3 23:58:58 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 7F8B210656EE; Thu, 3 Jul 2008 23:58:58 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9351E1065673 for ; Thu, 3 Jul 2008 23:58:57 +0000 (UTC) (envelope-from julian@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 830398FC13 for ; Thu, 3 Jul 2008 23:58:57 +0000 (UTC) (envelope-from julian@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m63NwvKX047198 for ; Thu, 3 Jul 2008 23:58:57 GMT (envelope-from julian@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m63NwvvS047196 for perforce@freebsd.org; Thu, 3 Jul 2008 23:58:57 GMT (envelope-from julian@freebsd.org) Date: Thu, 3 Jul 2008 23:58:57 GMT Message-Id: <200807032358.m63NwvvS047196@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to julian@freebsd.org using -f From: Julian Elischer To: Perforce Change Reviews Cc: Subject: PERFORCE change 144584 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Jul 2008 23:58:58 -0000 http://perforce.freebsd.org/chv.cgi?CH=144584 Change 144584 by julian@julian_trafmon1 on 2008/07/03 23:58:40 make up our mind abut ipstealth on a vimage basis Affected files ... .. //depot/projects/vimage/src/sys/netinet/ip_fastfwd.c#9 edit .. //depot/projects/vimage/src/sys/netinet/ip_input.c#26 edit .. //depot/projects/vimage/src/sys/netinet/ip_options.c#10 edit .. //depot/projects/vimage/src/sys/netinet/vinet.h#22 edit Differences ... ==== //depot/projects/vimage/src/sys/netinet/ip_fastfwd.c#9 (text+ko) ==== @@ -400,7 +400,7 @@ * Check TTL */ #ifdef IPSTEALTH - if (!ipstealth) { + if (!V_ipstealth) { #endif if (ip->ip_ttl <= IPTTLDEC) { icmp_error(m, ICMP_TIMXCEED, ICMP_TIMXCEED_INTRANS, 0, 0); ==== //depot/projects/vimage/src/sys/netinet/ip_input.c#26 (text+ko) ==== @@ -677,7 +677,7 @@ * IPSTEALTH: Process non-routing options only * if the packet is destined for us. */ - if (ipstealth && hlen > sizeof (struct ip) && + if (V_ipstealth && hlen > sizeof (struct ip) && ip_dooptions(m, 1)) return; #endif /* IPSTEALTH */ @@ -1331,7 +1331,7 @@ return; } #ifdef IPSTEALTH - if (!ipstealth) { + if (!V_ipstealth) { #endif if (ip->ip_ttl <= IPTTLDEC) { icmp_error(m, ICMP_TIMXCEED, ICMP_TIMXCEED_INTRANS, @@ -1382,7 +1382,7 @@ } #ifdef IPSTEALTH - if (!ipstealth) { + if (!V_ipstealth) { #endif ip->ip_ttl -= IPTTLDEC; #ifdef IPSTEALTH ==== //depot/projects/vimage/src/sys/netinet/ip_options.c#10 (text+ko) ==== @@ -155,7 +155,7 @@ case IPOPT_LSRR: case IPOPT_SSRR: #ifdef IPSTEALTH - if (ipstealth && pass > 0) + if (V_ipstealth && pass > 0) break; #endif if (optlen < IPOPT_OFFSET + sizeof(*cp)) { @@ -194,7 +194,7 @@ break; } #ifdef IPSTEALTH - if (ipstealth) + if (V_ipstealth) goto dropit; #endif if (!ip_dosourceroute) { @@ -257,7 +257,7 @@ case IPOPT_RR: #ifdef IPSTEALTH - if (ipstealth && pass == 0) + if (V_ipstealth && pass == 0) break; #endif if (optlen < IPOPT_OFFSET + sizeof(*cp)) { @@ -294,7 +294,7 @@ case IPOPT_TS: #ifdef IPSTEALTH - if (ipstealth && pass == 0) + if (V_ipstealth && pass == 0) break; #endif code = cp - (u_char *)ip; ==== //depot/projects/vimage/src/sys/netinet/vinet.h#22 (text+ko) ==== @@ -66,6 +66,7 @@ int _sameprefixcarponly; int _ipforwarding; + int _ipstealth; int _ipfastforward_active; int _ipsendredirects; int _ip_defttl; @@ -201,6 +202,7 @@ #define V_sameprefixcarponly VNET_INET(sameprefixcarponly) #define V_ipforwarding VNET_INET(ipforwarding) +#define V_ipstealth VNET_INET(ipstealth) #define V_ipfastforward_active VNET_INET(ipfastforward_active) #define V_ipsendredirects VNET_INET(ipsendredirects) #define V_ip_defttl VNET_INET(ip_defttl)