diff options
Diffstat (limited to 'net/ipv4/af_inet.c')
-rw-r--r-- | net/ipv4/af_inet.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/net/ipv4/af_inet.c b/net/ipv4/af_inet.c index 09ca5293d08f..c270080f370e 100644 --- a/net/ipv4/af_inet.c +++ b/net/ipv4/af_inet.c | |||
@@ -784,6 +784,7 @@ int inet_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg) | |||
784 | { | 784 | { |
785 | struct sock *sk = sock->sk; | 785 | struct sock *sk = sock->sk; |
786 | int err = 0; | 786 | int err = 0; |
787 | struct net *net = sk->sk_net; | ||
787 | 788 | ||
788 | switch (cmd) { | 789 | switch (cmd) { |
789 | case SIOCGSTAMP: | 790 | case SIOCGSTAMP: |
@@ -795,12 +796,12 @@ int inet_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg) | |||
795 | case SIOCADDRT: | 796 | case SIOCADDRT: |
796 | case SIOCDELRT: | 797 | case SIOCDELRT: |
797 | case SIOCRTMSG: | 798 | case SIOCRTMSG: |
798 | err = ip_rt_ioctl(sk->sk_net, cmd, (void __user *)arg); | 799 | err = ip_rt_ioctl(net, cmd, (void __user *)arg); |
799 | break; | 800 | break; |
800 | case SIOCDARP: | 801 | case SIOCDARP: |
801 | case SIOCGARP: | 802 | case SIOCGARP: |
802 | case SIOCSARP: | 803 | case SIOCSARP: |
803 | err = arp_ioctl(sk->sk_net, cmd, (void __user *)arg); | 804 | err = arp_ioctl(net, cmd, (void __user *)arg); |
804 | break; | 805 | break; |
805 | case SIOCGIFADDR: | 806 | case SIOCGIFADDR: |
806 | case SIOCSIFADDR: | 807 | case SIOCSIFADDR: |
@@ -813,7 +814,7 @@ int inet_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg) | |||
813 | case SIOCSIFPFLAGS: | 814 | case SIOCSIFPFLAGS: |
814 | case SIOCGIFPFLAGS: | 815 | case SIOCGIFPFLAGS: |
815 | case SIOCSIFFLAGS: | 816 | case SIOCSIFFLAGS: |
816 | err = devinet_ioctl(cmd, (void __user *)arg); | 817 | err = devinet_ioctl(net, cmd, (void __user *)arg); |
817 | break; | 818 | break; |
818 | default: | 819 | default: |
819 | if (sk->sk_prot->ioctl) | 820 | if (sk->sk_prot->ioctl) |