[ovs-dev] [PATCH 1/8] ip6_gre: Fix a bug that clears address bits

Gregory Rose gvrose8192 at gmail.com
Thu Aug 9 22:59:56 UTC 2018


On 8/8/2018 11:32 AM, Yifeng Sun wrote:
> In compatable gre module, skb->cb is used as ovs_gso_cb.
> This bug clears the 16-23 bit in the address of ovs_gso_cb.tun_dst.
>
> Signed-off-by: Yifeng Sun <pkusunyifeng at gmail.com>
> ---
>   datapath/linux/compat/ip6_gre.c | 1 -
>   1 file changed, 1 deletion(-)
>
> diff --git a/datapath/linux/compat/ip6_gre.c b/datapath/linux/compat/ip6_gre.c
> index 54a76ab..16c1f72 100644
> --- a/datapath/linux/compat/ip6_gre.c
> +++ b/datapath/linux/compat/ip6_gre.c
> @@ -1146,7 +1146,6 @@ static netdev_tx_t ip6erspan_tunnel_xmit(struct sk_buff *skb,
>   		goto tx_err;
>   
>   	t->parms.o_flags &= ~TUNNEL_KEY;
> -	IPCB(skb)->flags = 0;
>   
>   	tun_info = ovs_skb_tunnel_info(skb);
>   	if (unlikely(!tun_info ||

Yifeng,

First, I'm sorry but you actually did identify the problem correctly at 
first, I just didn't see it.  My bad.

Second, I'm no longer worried about removing the code.  It shouldn't be 
used in the case where
we are not using USE_UPSTREAM_TUNNEL.  If USE_UPSTREAM_TUNNEL is defined 
then this entire
module does not compile anyway.  So I think removing the IPCB macro that 
sets the flags to zero is fine.

The same needs to be done in _gre6_xmit().

Go ahead and resubmit the patch with the _gre6_xmit() case handled as 
well and I think that should be fine.

Thanks for all your work!!!

- Greg


More information about the dev mailing list