diff options
Diffstat (limited to 'net/ipv4/devinet.c')
| -rw-r--r-- | net/ipv4/devinet.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/net/ipv4/devinet.c b/net/ipv4/devinet.c index 44bf82e3aef7..e12fad773852 100644 --- a/net/ipv4/devinet.c +++ b/net/ipv4/devinet.c | |||
| @@ -725,7 +725,7 @@ int devinet_ioctl(struct net *net, unsigned int cmd, void __user *arg) | |||
| 725 | break; | 725 | break; |
| 726 | 726 | ||
| 727 | case SIOCSIFFLAGS: | 727 | case SIOCSIFFLAGS: |
| 728 | ret = -EACCES; | 728 | ret = -EPERM; |
| 729 | if (!capable(CAP_NET_ADMIN)) | 729 | if (!capable(CAP_NET_ADMIN)) |
| 730 | goto out; | 730 | goto out; |
| 731 | break; | 731 | break; |
| @@ -733,7 +733,7 @@ int devinet_ioctl(struct net *net, unsigned int cmd, void __user *arg) | |||
| 733 | case SIOCSIFBRDADDR: /* Set the broadcast address */ | 733 | case SIOCSIFBRDADDR: /* Set the broadcast address */ |
| 734 | case SIOCSIFDSTADDR: /* Set the destination address */ | 734 | case SIOCSIFDSTADDR: /* Set the destination address */ |
| 735 | case SIOCSIFNETMASK: /* Set the netmask for the interface */ | 735 | case SIOCSIFNETMASK: /* Set the netmask for the interface */ |
| 736 | ret = -EACCES; | 736 | ret = -EPERM; |
| 737 | if (!capable(CAP_NET_ADMIN)) | 737 | if (!capable(CAP_NET_ADMIN)) |
| 738 | goto out; | 738 | goto out; |
| 739 | ret = -EINVAL; | 739 | ret = -EINVAL; |
| @@ -1503,7 +1503,7 @@ static int devinet_conf_proc(ctl_table *ctl, int write, | |||
| 1503 | if (i == IPV4_DEVCONF_ACCEPT_LOCAL - 1 || | 1503 | if (i == IPV4_DEVCONF_ACCEPT_LOCAL - 1 || |
| 1504 | i == IPV4_DEVCONF_ROUTE_LOCALNET - 1) | 1504 | i == IPV4_DEVCONF_ROUTE_LOCALNET - 1) |
| 1505 | if ((new_value == 0) && (old_value != 0)) | 1505 | if ((new_value == 0) && (old_value != 0)) |
| 1506 | rt_cache_flush(net, 0); | 1506 | rt_cache_flush(net); |
| 1507 | } | 1507 | } |
| 1508 | 1508 | ||
| 1509 | return ret; | 1509 | return ret; |
| @@ -1537,7 +1537,7 @@ static int devinet_sysctl_forward(ctl_table *ctl, int write, | |||
| 1537 | dev_disable_lro(idev->dev); | 1537 | dev_disable_lro(idev->dev); |
| 1538 | } | 1538 | } |
| 1539 | rtnl_unlock(); | 1539 | rtnl_unlock(); |
| 1540 | rt_cache_flush(net, 0); | 1540 | rt_cache_flush(net); |
| 1541 | } | 1541 | } |
| 1542 | } | 1542 | } |
| 1543 | 1543 | ||
| @@ -1554,7 +1554,7 @@ static int ipv4_doint_and_flush(ctl_table *ctl, int write, | |||
| 1554 | struct net *net = ctl->extra2; | 1554 | struct net *net = ctl->extra2; |
| 1555 | 1555 | ||
| 1556 | if (write && *valp != val) | 1556 | if (write && *valp != val) |
| 1557 | rt_cache_flush(net, 0); | 1557 | rt_cache_flush(net); |
| 1558 | 1558 | ||
| 1559 | return ret; | 1559 | return ret; |
| 1560 | } | 1560 | } |
