[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <da953234-0678-f0bb-1a73-265b0b506c1c@cogentembedded.com>
Date: Wed, 13 Dec 2017 13:05:04 +0300
From: Sergei Shtylyov <sergei.shtylyov@...entembedded.com>
To: Phil Dibowitz <phil@...m.com>, netdev@...r.kernel.org
Cc: phild@...com
Subject: Re: [PATCH iproute2] Show 'external' link mode in output
Hello!
On 12/12/2017 11:23 PM, Phil Dibowitz wrote:
> Recently `external` support was added to the tunnel drivers, but there is no way
> to introspect this from userspace. This adds support for that.
>
> Now `ip -details link` shows it:
>
> ```
> 7: tunl60@...E: <NOARP> mtu 1452 qdisc noop state DOWN mode DEFAULT group
> default qlen 1
> link/tunnel6 :: brd :: promiscuity 0
> ip6tnl external any remote :: local :: encaplimit 0 hoplimit 0 tclass 0x00 flowlabel 0x00000 (flowinfo 0x00000000) addrgenmode eui64 numtxqueues 1 numrxqueues 1 gso_max_size 65536 gso_max_segs 65535
> ```
>
> Signed-off-by: Phil Dibowitz <phil@...m.com>
> ---
> ip/link_ip6tnl.c | 3 +++
> ip/link_iptnl.c | 3 +++
> 2 files changed, 6 insertions(+)
>
> diff --git a/ip/link_ip6tnl.c b/ip/link_ip6tnl.c
> index 43287ab..5d0efc8 100644
> --- a/ip/link_ip6tnl.c
> +++ b/ip/link_ip6tnl.c
> @@ -345,6 +345,9 @@ static void ip6tunnel_print_opt(struct link_util *lu, FILE *f, struct rtattr *tb
> if (!tb)
> return;
>
> + if (tb[IFLA_IPTUN_COLLECT_METADATA])
> + print_bool(PRINT_ANY, "external", "external ", true);
> +
The original code is indented with tabs, you're using spaces. Not good. :-)
> if (tb[IFLA_IPTUN_FLAGS])
> flags = rta_getattr_u32(tb[IFLA_IPTUN_FLAGS]);
>
> diff --git a/ip/link_iptnl.c b/ip/link_iptnl.c
> index 4940b8b..e345b5c 100644
> --- a/ip/link_iptnl.c
> +++ b/ip/link_iptnl.c
> @@ -393,6 +393,9 @@ static void iptunnel_print_opt(struct link_util *lu, FILE *f, struct rtattr *tb[
> if (!tb)
> return;
>
> + if (tb[IFLA_IPTUN_COLLECT_METADATA])
> + print_bool(PRINT_ANY, "external", "external ", true);
> +
> if (tb[IFLA_IPTUN_REMOTE]) {
> unsigned int addr = rta_getattr_u32(tb[IFLA_IPTUN_REMOTE]);
>
Here as well...
MBR, Sergei
Powered by blists - more mailing lists