mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-24 14:41:02 +07:00
ip_tunnel: don't add tunnel twice
When using command "ip tunnel add" to add a tunnel, the tunnel will be added twice, through ip_tunnel_create() and ip_tunnel_update(). Because the second is unnecessary, so we can just break after adding tunnel through ip_tunnel_create(). Signed-off-by: Duan Jiong <duanj.fnst@cn.fujitsu.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
9bb1a208fd
commit
ee30ef4d45
@ -754,10 +754,8 @@ int ip_tunnel_ioctl(struct net_device *dev, struct ip_tunnel_parm *p, int cmd)
|
||||
|
||||
if (!t && (cmd == SIOCADDTUNNEL)) {
|
||||
t = ip_tunnel_create(net, itn, p);
|
||||
if (IS_ERR(t)) {
|
||||
err = PTR_ERR(t);
|
||||
break;
|
||||
}
|
||||
err = PTR_ERR_OR_ZERO(t);
|
||||
break;
|
||||
}
|
||||
if (dev != itn->fb_tunnel_dev && cmd == SIOCCHGTUNNEL) {
|
||||
if (t != NULL) {
|
||||
|
Loading…
Reference in New Issue
Block a user