Subject: Re: [PATCH] ipv4: ip_tunnels: disable dst cache for nbma gre tunnels

From: Timo Teras <[email-masked]>
Date: Thu, 15 May 2014 20:35:35 +0300

On Thu, 15 May 2014 11:35:17 +0300
Timo Teräs <[email-masked]> wrote:

> The connected check fails to check for ip_gre nbma mode tunnels
> properly. ip_gre creates temporary tnl_params with daddr specified
> to pass-in the actual target on per-packet basis from neighbor
> layer. Detect these tunnels by inspecting the actual tunnel
> configuration instead.
> 
> Fixes: 7d442fab0a67 ("ipv4: Cache dst in tunnels")
> Signed-off-by: Timo Teräs <[email-masked]>
> Cc: Tom Herbert <[email-masked]>
> Cc: Eric Dumazet <[email-masked]>
> ---
> Should go to 3.14-stable too.
> 
> (This does not fix all NBMA GRE regressions in 3.14.
>  I'm also getting weird oopses from GRO; will post soon more info.)
> 
>  net/ipv4/ip_tunnel.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/net/ipv4/ip_tunnel.c b/net/ipv4/ip_tunnel.c
> index e77381d..100caf5 100644
> --- a/net/ipv4/ip_tunnel.c
> +++ b/net/ipv4/ip_tunnel.c
> @@ -538,9 +538,10 @@ void ip_tunnel_xmit(struct sk_buff *skb, struct
> net_device *dev, unsigned int max_headroom;	/* The extra
> header space needed */ __be32 dst;
>  	int err;
> -	bool connected = true;
> +	bool connected;
>  
>  	inner_iph = (const struct iphdr *)skb_inner_network_header(skb);
> +	connected = (tunnel->daddr != 0);
>  
>  	dst = tnl_params->daddr;
>  	if (dst == 0) {

I meant tunnel->parms.iph.daddr here.  tunnel->daddr does not even
exist. I wonder which tree I was testing. I'll retry tests and send new
patch.