|
@@ -880,6 +880,19 @@ int inet_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)
|
|
|
}
|
|
|
EXPORT_SYMBOL(inet_ioctl);
|
|
|
|
|
|
+#ifdef CONFIG_COMPAT
|
|
|
+int inet_compat_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)
|
|
|
+{
|
|
|
+ struct sock *sk = sock->sk;
|
|
|
+ int err = -ENOIOCTLCMD;
|
|
|
+
|
|
|
+ if (sk->sk_prot->compat_ioctl)
|
|
|
+ err = sk->sk_prot->compat_ioctl(sk, cmd, arg);
|
|
|
+
|
|
|
+ return err;
|
|
|
+}
|
|
|
+#endif
|
|
|
+
|
|
|
const struct proto_ops inet_stream_ops = {
|
|
|
.family = PF_INET,
|
|
|
.owner = THIS_MODULE,
|
|
@@ -903,6 +916,7 @@ const struct proto_ops inet_stream_ops = {
|
|
|
#ifdef CONFIG_COMPAT
|
|
|
.compat_setsockopt = compat_sock_common_setsockopt,
|
|
|
.compat_getsockopt = compat_sock_common_getsockopt,
|
|
|
+ .compat_ioctl = inet_compat_ioctl,
|
|
|
#endif
|
|
|
};
|
|
|
EXPORT_SYMBOL(inet_stream_ops);
|
|
@@ -929,6 +943,7 @@ const struct proto_ops inet_dgram_ops = {
|
|
|
#ifdef CONFIG_COMPAT
|
|
|
.compat_setsockopt = compat_sock_common_setsockopt,
|
|
|
.compat_getsockopt = compat_sock_common_getsockopt,
|
|
|
+ .compat_ioctl = inet_compat_ioctl,
|
|
|
#endif
|
|
|
};
|
|
|
EXPORT_SYMBOL(inet_dgram_ops);
|
|
@@ -959,6 +974,7 @@ static const struct proto_ops inet_sockraw_ops = {
|
|
|
#ifdef CONFIG_COMPAT
|
|
|
.compat_setsockopt = compat_sock_common_setsockopt,
|
|
|
.compat_getsockopt = compat_sock_common_getsockopt,
|
|
|
+ .compat_ioctl = inet_compat_ioctl,
|
|
|
#endif
|
|
|
};
|
|
|
|