On Tue, 18 Dec 2018 17:53:33 +0800
we...@ucloud.cn wrote:

> From: wenxu <we...@ucloud.cn>
> 
> ip l add dev tun type gretap external
> ip r a 10.0.0.1 encap ip dst 192.168.152.171 id 1000 dev gretap
> 
> For gretap example when the command set the id but don't set the
> TUNNEL_KEY flags. There is no key field in the send packet
> 
> Signed-off-by: wenxu <we...@ucloud.cn>
> ---
>  include/uapi/linux/if_tunnel.h |    6 ++++++
>  ip/iproute_lwtunnel.c          |   11 ++++++++++-
>  2 files changed, 16 insertions(+), 1 deletions(-)
> 
> diff --git a/include/uapi/linux/if_tunnel.h b/include/uapi/linux/if_tunnel.h
> index ecdc766..40b8009 100644
> --- a/include/uapi/linux/if_tunnel.h
> +++ b/include/uapi/linux/if_tunnel.h
> @@ -160,4 +160,10 @@ enum {
>  };
>  
>  #define IFLA_VTI_MAX (__IFLA_VTI_MAX - 1)
> +
> +#define TUNNEL_CSUM     __cpu_to_be16(0x01)
> +#define TUNNEL_KEY      __cpu_to_be16(0x04)
> +#define TUNNEL_SEQ      __cpu_to_be16(0x08)
> +#define TUNNEL_DONT_FRAGMENT    __cpu_to_be16(0x0100)
> +
>  #endif /* _IF_TUNNEL_H_ */

This is not upstream in net-next yet. Header files come from kernel

Reply via email to