From: Stephen Hemminger <stephen@networkplumber.org>
To: wenxu@ucloud.cn
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH iproute2] iproute: lwtunnel set TUNNEL_KEY on LWTUNNEL_IP_FLAGS
Date: Tue, 18 Dec 2018 08:11:38 -0800 [thread overview]
Message-ID: <20181218081138.02f14726@xeon-e3> (raw)
In-Reply-To: <1545126813-24284-1-git-send-email-wenxu@ucloud.cn>
On Tue, 18 Dec 2018 17:53:33 +0800
wenxu@ucloud.cn wrote:
> From: wenxu <wenxu@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 <wenxu@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
prev parent reply other threads:[~2018-12-18 16:11 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-18 9:53 [PATCH iproute2] iproute: lwtunnel set TUNNEL_KEY on LWTUNNEL_IP_FLAGS wenxu
2018-12-18 16:11 ` Stephen Hemminger [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20181218081138.02f14726@xeon-e3 \
--to=stephen@networkplumber.org \
--cc=netdev@vger.kernel.org \
--cc=wenxu@ucloud.cn \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).