All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH iproute2] ip6tunnel: fix 'ip -6 {show|change} dev <name>' cmds
@ 2019-06-06 23:44 Mahesh Bandewar
  2019-06-10 17:48 ` Stephen Hemminger
  0 siblings, 1 reply; 2+ messages in thread
From: Mahesh Bandewar @ 2019-06-06 23:44 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: Mahesh Bandewar, Netdev, Mahesh Bandewar

Inclusion of 'dev' is allowed by the syntax but not handled
correctly by the command. It produces no output for show
command and falsely successful for change command but does
not make any changes.

can be verified with the following steps
  # ip -6 tunnel add ip6tnl1 mode ip6gre local fd::1 remote fd::2 tos inherit ttl 127 encaplimit none
  # ip -6 tunnel show ip6tnl1
  <correct output>
  # ip -6 tunnel show dev ip6tnl1
  <no output but correct output after this change>
  # ip -6 tunnel change dev ip6tnl1 local 2001:1234::1 remote 2001:1234::2 encaplimit none ttl 127 tos inherit allow-localremote
  # echo $?
  0
  # ip -6 tunnel show ip6tnl1
  <no changes applied, but changes are correctly applied after this change>

Signed-off-by: Mahesh Bandewar <maheshb@google.com>
---
 ip/ip6tunnel.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/ip/ip6tunnel.c b/ip/ip6tunnel.c
index 999408ed801b..56fd3466ed06 100644
--- a/ip/ip6tunnel.c
+++ b/ip/ip6tunnel.c
@@ -298,6 +298,8 @@ static int parse_args(int argc, char **argv, int cmd, struct ip6_tnl_parm2 *p)
 		p->link = ll_name_to_index(medium);
 		if (!p->link)
 			return nodev(medium);
+		else
+			strlcpy(p->name, medium, sizeof(p->name));
 	}
 	return 0;
 }
-- 
2.22.0.rc1.311.g5d7573a151-goog


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH iproute2] ip6tunnel: fix 'ip -6 {show|change} dev <name>' cmds
  2019-06-06 23:44 [PATCH iproute2] ip6tunnel: fix 'ip -6 {show|change} dev <name>' cmds Mahesh Bandewar
@ 2019-06-10 17:48 ` Stephen Hemminger
  0 siblings, 0 replies; 2+ messages in thread
From: Stephen Hemminger @ 2019-06-10 17:48 UTC (permalink / raw)
  To: Mahesh Bandewar; +Cc: Mahesh Bandewar, Netdev

On Thu,  6 Jun 2019 16:44:26 -0700
Mahesh Bandewar <maheshb@google.com> wrote:

> Inclusion of 'dev' is allowed by the syntax but not handled
> correctly by the command. It produces no output for show
> command and falsely successful for change command but does
> not make any changes.
> 
> can be verified with the following steps
>   # ip -6 tunnel add ip6tnl1 mode ip6gre local fd::1 remote fd::2 tos inherit ttl 127 encaplimit none
>   # ip -6 tunnel show ip6tnl1
>   <correct output>
>   # ip -6 tunnel show dev ip6tnl1
>   <no output but correct output after this change>
>   # ip -6 tunnel change dev ip6tnl1 local 2001:1234::1 remote 2001:1234::2 encaplimit none ttl 127 tos inherit allow-localremote
>   # echo $?
>   0
>   # ip -6 tunnel show ip6tnl1
>   <no changes applied, but changes are correctly applied after this change>
> 
> Signed-off-by: Mahesh Bandewar <maheshb@google.com>

Applied, thanks.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-06-10 17:48 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-06 23:44 [PATCH iproute2] ip6tunnel: fix 'ip -6 {show|change} dev <name>' cmds Mahesh Bandewar
2019-06-10 17:48 ` Stephen Hemminger

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.