mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-20 05:31:15 +00:00
ipv6: stub out even more of addrconf_set_dstaddr if SIT is disabled
There is no point in copying the structure from userspace or looking up a device if SIT support is not disabled and we'll eventually return -ENODEV anyway. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
f60fe2df93
commit
f098846044
1 changed files with 3 additions and 2 deletions
|
@ -2794,6 +2794,9 @@ int addrconf_set_dstaddr(struct net *net, void __user *arg)
|
||||||
struct net_device *dev;
|
struct net_device *dev;
|
||||||
int err = -EINVAL;
|
int err = -EINVAL;
|
||||||
|
|
||||||
|
if (!IS_ENABLED(CONFIG_IPV6_SIT))
|
||||||
|
return -ENODEV;
|
||||||
|
|
||||||
rtnl_lock();
|
rtnl_lock();
|
||||||
|
|
||||||
err = -EFAULT;
|
err = -EFAULT;
|
||||||
|
@ -2806,7 +2809,6 @@ int addrconf_set_dstaddr(struct net *net, void __user *arg)
|
||||||
if (!dev)
|
if (!dev)
|
||||||
goto err_exit;
|
goto err_exit;
|
||||||
|
|
||||||
#if IS_ENABLED(CONFIG_IPV6_SIT)
|
|
||||||
if (dev->type == ARPHRD_SIT) {
|
if (dev->type == ARPHRD_SIT) {
|
||||||
const struct net_device_ops *ops = dev->netdev_ops;
|
const struct net_device_ops *ops = dev->netdev_ops;
|
||||||
struct ifreq ifr;
|
struct ifreq ifr;
|
||||||
|
@ -2842,7 +2844,6 @@ int addrconf_set_dstaddr(struct net *net, void __user *arg)
|
||||||
err = dev_open(dev, NULL);
|
err = dev_open(dev, NULL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
err_exit:
|
err_exit:
|
||||||
rtnl_unlock();
|
rtnl_unlock();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue