OSDN Git Service

sit: set name of device back to struct parms
authorzhang kai <zhangkaiheb@126.com>
Wed, 2 Jun 2021 10:36:26 +0000 (18:36 +0800)
committerDavid S. Miller <davem@davemloft.net>
Thu, 3 Jun 2021 20:57:36 +0000 (13:57 -0700)
addrconf_set_sit_dstaddr will use parms->name.

Signed-off-by: zhang kai <zhangkaiheb@126.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv6/sit.c

index aa98294..f7c8110 100644 (file)
@@ -271,6 +271,9 @@ static struct ip_tunnel *ipip6_tunnel_locate(struct net *net,
        if (ipip6_tunnel_create(dev) < 0)
                goto failed_free;
 
+       if (!parms->name[0])
+               strcpy(parms->name, dev->name);
+
        return nt;
 
 failed_free: