diff options
author | David S. Miller <davem@davemloft.net> | 2011-01-31 16:13:24 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-01-31 16:13:24 -0500 |
commit | 5403c8a29521a6eb02f9283dbbe0184527f8f42b (patch) | |
tree | 4f1ca17feda4dfa88f53eceeaa39583ec840d27e /net/ipv4/af_inet.c | |
parent | c79b9e4936142d5ed26073d58bdd4a5a0ac62f32 (diff) | |
parent | c4c93106741bbf61ecd05a2a835af8e3bf31c1bd (diff) |
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Diffstat (limited to 'net/ipv4/af_inet.c')
-rw-r--r-- | net/ipv4/af_inet.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/net/ipv4/af_inet.c b/net/ipv4/af_inet.c index e5e2d9d64abb..7ceb80447631 100644 --- a/net/ipv4/af_inet.c +++ b/net/ipv4/af_inet.c | |||
@@ -880,6 +880,19 @@ int inet_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg) | |||
880 | } | 880 | } |
881 | EXPORT_SYMBOL(inet_ioctl); | 881 | EXPORT_SYMBOL(inet_ioctl); |
882 | 882 | ||
883 | #ifdef CONFIG_COMPAT | ||
884 | int inet_compat_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg) | ||
885 | { | ||
886 | struct sock *sk = sock->sk; | ||
887 | int err = -ENOIOCTLCMD; | ||
888 | |||
889 | if (sk->sk_prot->compat_ioctl) | ||
890 | err = sk->sk_prot->compat_ioctl(sk, cmd, arg); | ||
891 | |||
892 | return err; | ||
893 | } | ||
894 | #endif | ||
895 | |||
883 | const struct proto_ops inet_stream_ops = { | 896 | const struct proto_ops inet_stream_ops = { |
884 | .family = PF_INET, | 897 | .family = PF_INET, |
885 | .owner = THIS_MODULE, | 898 | .owner = THIS_MODULE, |
@@ -903,6 +916,7 @@ const struct proto_ops inet_stream_ops = { | |||
903 | #ifdef CONFIG_COMPAT | 916 | #ifdef CONFIG_COMPAT |
904 | .compat_setsockopt = compat_sock_common_setsockopt, | 917 | .compat_setsockopt = compat_sock_common_setsockopt, |
905 | .compat_getsockopt = compat_sock_common_getsockopt, | 918 | .compat_getsockopt = compat_sock_common_getsockopt, |
919 | .compat_ioctl = inet_compat_ioctl, | ||
906 | #endif | 920 | #endif |
907 | }; | 921 | }; |
908 | EXPORT_SYMBOL(inet_stream_ops); | 922 | EXPORT_SYMBOL(inet_stream_ops); |
@@ -929,6 +943,7 @@ const struct proto_ops inet_dgram_ops = { | |||
929 | #ifdef CONFIG_COMPAT | 943 | #ifdef CONFIG_COMPAT |
930 | .compat_setsockopt = compat_sock_common_setsockopt, | 944 | .compat_setsockopt = compat_sock_common_setsockopt, |
931 | .compat_getsockopt = compat_sock_common_getsockopt, | 945 | .compat_getsockopt = compat_sock_common_getsockopt, |
946 | .compat_ioctl = inet_compat_ioctl, | ||
932 | #endif | 947 | #endif |
933 | }; | 948 | }; |
934 | EXPORT_SYMBOL(inet_dgram_ops); | 949 | EXPORT_SYMBOL(inet_dgram_ops); |
@@ -959,6 +974,7 @@ static const struct proto_ops inet_sockraw_ops = { | |||
959 | #ifdef CONFIG_COMPAT | 974 | #ifdef CONFIG_COMPAT |
960 | .compat_setsockopt = compat_sock_common_setsockopt, | 975 | .compat_setsockopt = compat_sock_common_setsockopt, |
961 | .compat_getsockopt = compat_sock_common_getsockopt, | 976 | .compat_getsockopt = compat_sock_common_getsockopt, |
977 | .compat_ioctl = inet_compat_ioctl, | ||
962 | #endif | 978 | #endif |
963 | }; | 979 | }; |
964 | 980 | ||