]> git.ipfire.org Git - thirdparty/iproute2.git/commitdiff
Revert "ip6tunnel: fix 'ip -6 {show|change} dev <name>' cmds"
authorAndrea Claudi <aclaudi@redhat.com>
Tue, 9 Jul 2019 13:16:50 +0000 (15:16 +0200)
committerStephen Hemminger <stephen@networkplumber.org>
Tue, 16 Jul 2019 19:25:05 +0000 (12:25 -0700)
This reverts commit ba126dcad20e6d0e472586541d78bdd1ac4f1123.
It breaks tunnel creation when using 'dev' parameter:

$ ip link add type dummy
$ ip -6 tunnel add ip6tnl1 mode ip6ip6 remote 2001:db8:ffff:100::2 local 2001:db8:ffff:100::1 hoplimit 1 tclass 0x0 dev dummy0
add tunnel "ip6tnl0" failed: File exists

dev parameter must be used to specify the device to which
the tunnel is binded, and not the tunnel itself.

Reported-by: Jianwen Ji <jiji@redhat.com>
Reviewed-by: Matteo Croce <mcroce@redhat.com>
Signed-off-by: Andrea Claudi <aclaudi@redhat.com>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
ip/ip6tunnel.c

index 2e0f099cd7ced950035d595c804d1d42018daa3c..a1bf366b411b916e86274e016fcc2dcb2a4dd215 100644 (file)
@@ -299,8 +299,6 @@ 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;
 }