diff options
Diffstat (limited to 'net/ipv4/raw.c')
-rw-r--r-- | net/ipv4/raw.c | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/net/ipv4/raw.c b/net/ipv4/raw.c index c9893d43242..08526786dc3 100644 --- a/net/ipv4/raw.c +++ b/net/ipv4/raw.c | |||
@@ -825,28 +825,28 @@ static int compat_raw_getsockopt(struct sock *sk, int level, int optname, | |||
825 | static int raw_ioctl(struct sock *sk, int cmd, unsigned long arg) | 825 | static int raw_ioctl(struct sock *sk, int cmd, unsigned long arg) |
826 | { | 826 | { |
827 | switch (cmd) { | 827 | switch (cmd) { |
828 | case SIOCOUTQ: { | 828 | case SIOCOUTQ: { |
829 | int amount = sk_wmem_alloc_get(sk); | 829 | int amount = sk_wmem_alloc_get(sk); |
830 | 830 | ||
831 | return put_user(amount, (int __user *)arg); | 831 | return put_user(amount, (int __user *)arg); |
832 | } | 832 | } |
833 | case SIOCINQ: { | 833 | case SIOCINQ: { |
834 | struct sk_buff *skb; | 834 | struct sk_buff *skb; |
835 | int amount = 0; | 835 | int amount = 0; |
836 | 836 | ||
837 | spin_lock_bh(&sk->sk_receive_queue.lock); | 837 | spin_lock_bh(&sk->sk_receive_queue.lock); |
838 | skb = skb_peek(&sk->sk_receive_queue); | 838 | skb = skb_peek(&sk->sk_receive_queue); |
839 | if (skb != NULL) | 839 | if (skb != NULL) |
840 | amount = skb->len; | 840 | amount = skb->len; |
841 | spin_unlock_bh(&sk->sk_receive_queue.lock); | 841 | spin_unlock_bh(&sk->sk_receive_queue.lock); |
842 | return put_user(amount, (int __user *)arg); | 842 | return put_user(amount, (int __user *)arg); |
843 | } | 843 | } |
844 | 844 | ||
845 | default: | 845 | default: |
846 | #ifdef CONFIG_IP_MROUTE | 846 | #ifdef CONFIG_IP_MROUTE |
847 | return ipmr_ioctl(sk, cmd, (void __user *)arg); | 847 | return ipmr_ioctl(sk, cmd, (void __user *)arg); |
848 | #else | 848 | #else |
849 | return -ENOIOCTLCMD; | 849 | return -ENOIOCTLCMD; |
850 | #endif | 850 | #endif |
851 | } | 851 | } |
852 | } | 852 | } |