Hajimu UMEMOTO wrote:
> 
> Hi,
> 
> >>>>> On Sun, 09 Nov 2003 17:19:07 +0100
> >>>>> Andre Oppermann <[EMAIL PROTECTED]> 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've applied you fix. This was an oversight by me when collapsing
the two IPSEC and FAST_IPSEC ifdef's.

However there is a problem in netkey/key.c with the static variable
ipsec_esp_auth which is unused if IPSEC_ESP is not defined.

-- 
Andre


> 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
> [EMAIL PROTECTED]  [EMAIL PROTECTED]  [EMAIL PROTECTED],jp.}FreeBSD.org
> http://www.imasy.org/~ume/
_______________________________________________
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to