netdev
[Top] [All Lists]

Re: [PATCH 3/3 XFRM]: Fix invalid key for lookup of cached bundles

To: kaber@xxxxxxxxx (Patrick McHardy)
Subject: Re: [PATCH 3/3 XFRM]: Fix invalid key for lookup of cached bundles
From: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
Date: Sun, 06 Mar 2005 21:29:34 +1100
Cc: davem@xxxxxxxxxxxxx, netdev@xxxxxxxxxxx
In-reply-to: <4229BB3E.8020203@trash.net>
Organization: Core
Sender: netdev-bounce@xxxxxxxxxxx
User-agent: tin/1.7.4-20040225 ("Benbecula") (UNIX) (Linux/2.4.27-hx-1-686-smp (i686))
Patrick McHardy <kaber@xxxxxxxxx> wrote:
>
> @@ -97,6 +104,7 @@
>               err = xfrm_dst_lookup((struct xfrm_dst**)&rt, &fl_tunnel, 
> AF_INET);
>               if (err)
>                       goto error;
> +             rt->u.dst.flags |= DST_XFRM_TUNNEL;

This line doesn't look right.  rt is an entry in the IPv4 routing
cache, right? If so why should its flags change when some bundle is
created?

After all, it could also be used at the bottom of a transport mode bundle.

Besides, I think IPv4 routing cache entry will never show up at the top of
a bundle anyway which means that this flags value will never be read in
the find_bundle function.

Cheers,
-- 
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <herbert@xxxxxxxxxxxxxxxxxxx>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

<Prev in Thread] Current Thread [Next in Thread>