From owner-freebsd-net@FreeBSD.ORG Tue Nov 11 07:26:00 2003 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 82B4C16A4CE; Tue, 11 Nov 2003 07:26:00 -0800 (PST) Received: from cheer.mahoroba.org (flets19-018.kamome.or.jp [218.45.19.18]) by mx1.FreeBSD.org (Postfix) with ESMTP id 85FF643FF2; Tue, 11 Nov 2003 07:25:56 -0800 (PST) (envelope-from ume@mahoroba.org) Received: from lyrics.mahoroba.org (IDENT:ygcmI3DUzInNlIq0w12bebMOEqTxmSs0IGDpunGlZ8+Z5GQsbD6WiKcXaL3E/tEp@lyrics.mahoroba.org [IPv6:3ffe:501:185b:8010:280:88ff:fe03:4841]) (user=ume mech=CRAM-MD5 bits=0)hABFOnEU041480 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 12 Nov 2003 00:24:52 +0900 (JST) (envelope-from ume@mahoroba.org) Date: Wed, 12 Nov 2003 00:24:47 +0900 Message-ID: From: Hajimu UMEMOTO To: Andre Oppermann In-Reply-To: <3FAE68FB.64D262FF@pipeline.ch> References: <3FAE68FB.64D262FF@pipeline.ch> User-Agent: xcite1.38> Wanderlust/2.11.3 (Wonderwall) SEMI/1.14.5 (Awara-Onsen) FLIM/1.14.5 (Demachiyanagi) APEL/10.6 Emacs/21.3 (i386--freebsd) MULE/5.0 (=?ISO-2022-JP?B?GyRCOC1MWhsoQg==?=) X-Operating-System: FreeBSD 5.1-CURRENT MIME-Version: 1.0 (generated by SEMI 1.14.5 - "Awara-Onsen") Content-Type: text/plain; charset=US-ASCII X-Virus-Scanned: by amavisd-new X-Spam-Status: No, hits=0.6 required=5.0 tests=DOMAIN_4U2 autolearn=no version=2.60 X-Spam-Checker-Version: SpamAssassin 2.60 (1.212-2003-09-23-exp) on cheer.mahoroba.org cc: freebsd-net@freebsd.org cc: freebsd-current@freebsd.org cc: mb@imp.ch cc: sam@errno.com Subject: Re: tcp hostcache and ip fastforward for review X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Nov 2003 15:26:00 -0000 Hi, >>>>> On Sun, 09 Nov 2003 17:19:07 +0100 >>>>> Andre Oppermann said: oppermann> The patch is here (relative to -CURRENT as of 2003-11-09): oppermann> http://www.nrg4u.com/freebsd/tcphostcache+ipfastforward-20031109.patch The patch cannot be compiled: cc -c -O -pipe -march=pentium3 -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -fformat-extensions -std=c99 -g -nostdinc -I- -I. -I/usr/home/ume/cvs/freefall/current/src/sys -I/usr/home/ume/cvs/freefall/current/src/sys/contrib/dev/acpica -I/usr/home/ume/cvs/freefall/current/src/sys/contrib/ipfilter -I/usr/home/ume/cvs/freefall/current/src/sys/contrib/dev/ath -I/usr/home/ume/cvs/freefall/current/src/sys/contrib/dev/ath/freebsd -I/usr/home/ume/cvs/freefall/current/src/sys/contrib/ngatm -D_KERNEL -include opt_global.h -fno-common -finline-limit=15000 -fno-strict-aliasing -mno-align-long-strings -mpreferred-stack-boundary=2 -ffreestanding -Werror /usr/home/ume/cvs/freefall/current/src/sys/netinet/ip_input.c /usr/home/ume/cvs/freefall/current/src/sys/netinet/ip_input.c: In function `ip_forward': /usr/home/ume/cvs/freefall/current/src/sys/netinet/ip_input.c:1960: warning: implicit declaration of function `ipsec_getpolicybyaddr' /usr/home/ume/cvs/freefall/current/src/sys/netinet/ip_input.c:1963: warning: assignment makes pointer from integer without a cast *** Error code 1 There is no ipsec_getpolicybyaddr() for IPSEC. And, #ifdef is slightly complex. I don't tested it actually, yet. --- sys/netinet/ip_input.c.orig Wed Nov 12 00:08:42 2003 +++ sys/netinet/ip_input.c Wed Nov 12 00:18:50 2003 @@ -1957,10 +1957,17 @@ int ipsechdr; struct route *ro; +#ifdef IPSEC + sp = ipsec4_getpolicybyaddr(mcopy, + IPSEC_DIR_OUTBOUND, + IP_FORWARDING, + &ipsecerror); +#else sp = ipsec_getpolicybyaddr(mcopy, IPSEC_DIR_OUTBOUND, IP_FORWARDING, &ipsecerror); +#endif if (sp != NULL) { /* count IPsec header size */ @@ -1995,13 +2002,11 @@ #else KEY_FREESP(&sp); #endif - ipstat.ips_cantfrag++; - break; - } else -#endif /*IPSEC || FAST_IPSEC*/ - destifp = ia->ia_ifp; -#if defined(IPSEC) || defined(FAST_IPSEC) + } else + destifp = ia->ia_ifp; } +#else + destifp = ia->ia_ifp; #endif /*IPSEC || FAST_IPSEC*/ ipstat.ips_cantfrag++; break; Sincerely, -- Hajimu UMEMOTO @ Internet Mutual Aid Society Yokohama, Japan ume@mahoroba.org ume@bisd.hitachi.co.jp ume@{,jp.}FreeBSD.org http://www.imasy.org/~ume/