lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <865c9c45-503d-9de2-aff4-ae2e5e5a8654@gmail.com>
Date:   Tue, 2 Jan 2018 23:29:28 +0200
From:   Serhey Popovych <serhe.popovych@...il.com>
To:     Stephen Hemminger <stephen@...workplumber.org>
Cc:     netdev@...r.kernel.org
Subject: Re: [PATCH iproute2 v2 2/3] link_iptnl: Print tunnel mode

Stephen Hemminger wrote:
> On Tue,  2 Jan 2018 23:02:45 +0200
> Serhey Popovych <serhe.popovych@...il.com> wrote:
> 
>> Tunnel mode does not appear in parameters print for iptnl
>> supported tunnels like ipip and sit, while printed for
>> ip6tnl.
>>
>> Print tunnel mode as "proto" field name for JSON and
>> without any name when printing to cli to follow ip6tnl
>> behaviour.
>>
>> For non JSON output we have:
>>
>>    $ ip -d link show dev sit1
>>
>> Before:
>> -------
>> 17: sit1@...E: <NOARP> mtu 1480 qdisc noop state DOWN ...
>>     link/sit X.X.X.X brd 0.0.0.0 promiscuity 0
>>     sit remote any local X.X.X.X ...
>>         ~~~
>>
>> After:
>> ------
>> 17: sit1@...E: <NOARP> mtu 1480 qdisc noop state DOWN ...
>>     link/sit X.X.X.X brd 0.0.0.0 promiscuity 0
>>     sit any remote any local X.X.X.X ...
>>         ^^^
>>
>> Signed-off-by: Serhey Popovych <serhe.popovych@...il.com>
>> ---
>> v2: Addressed comments: "proto ipip" vs "proto ip4ip4" for
>>     IPPROTO_IPIP tunnel type. Add example to message.
>>
>>  ip/link_iptnl.c |   17 +++++++++++++++++
>>  1 file changed, 17 insertions(+)
>>
>> diff --git a/ip/link_iptnl.c b/ip/link_iptnl.c
>> index d4d935b..b6ef95d 100644
>> --- a/ip/link_iptnl.c
>> +++ b/ip/link_iptnl.c
>> @@ -372,6 +372,23 @@ static void iptunnel_print_opt(struct link_util *lu, FILE *f, struct rtattr *tb[
>>  	if (tb[IFLA_IPTUN_COLLECT_METADATA])
>>  		print_bool(PRINT_ANY, "external", "external ", true);
>>  
>> +	if (tb[IFLA_IPTUN_PROTO]) {
>> +		switch (rta_getattr_u8(tb[IFLA_IPTUN_PROTO])) {
>> +		case IPPROTO_IPIP:
>> +			print_string(PRINT_ANY, "proto", "%s ", "ipip");
>> +			break;
>> +		case IPPROTO_IPV6:
>> +			print_string(PRINT_ANY, "proto", "%s ", "ip6ip");
>> +			break;
>> +		case IPPROTO_MPLS:
>> +			print_string(PRINT_ANY, "proto", "%s ", "mplsip");
>> +			break;
>> +		case 0:
>> +			print_string(PRINT_ANY, "proto", "%s ", "any");
>> +			break;
>> +		}
>> +	}
>> +
>>  	if (tb[IFLA_IPTUN_REMOTE]) {
>>  		unsigned int addr = rta_getattr_u32(tb[IFLA_IPTUN_REMOTE]);
> 
> Thanks for fixing the ip4 value.
> 
> When you fix one thing, you need to resend whole patch series.

Submitted v2 series. Thank you for the tip!

> 
> 



Download attachment "signature.asc" of type "application/pgp-signature" (491 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ