diff options
Diffstat (limited to 'net/ipv6/raw.c')
| -rw-r--r-- | net/ipv6/raw.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/net/ipv6/raw.c b/net/ipv6/raw.c index 86c39526ba5..c5b0915d106 100644 --- a/net/ipv6/raw.c +++ b/net/ipv6/raw.c | |||
| @@ -31,6 +31,7 @@ | |||
| 31 | #include <linux/netfilter.h> | 31 | #include <linux/netfilter.h> |
| 32 | #include <linux/netfilter_ipv6.h> | 32 | #include <linux/netfilter_ipv6.h> |
| 33 | #include <linux/skbuff.h> | 33 | #include <linux/skbuff.h> |
| 34 | #include <linux/compat.h> | ||
| 34 | #include <asm/uaccess.h> | 35 | #include <asm/uaccess.h> |
| 35 | #include <asm/ioctls.h> | 36 | #include <asm/ioctls.h> |
| 36 | 37 | ||
| @@ -1157,6 +1158,23 @@ static int rawv6_ioctl(struct sock *sk, int cmd, unsigned long arg) | |||
| 1157 | } | 1158 | } |
| 1158 | } | 1159 | } |
| 1159 | 1160 | ||
| 1161 | #ifdef CONFIG_COMPAT | ||
| 1162 | static int compat_rawv6_ioctl(struct sock *sk, unsigned int cmd, unsigned long arg) | ||
| 1163 | { | ||
| 1164 | switch (cmd) { | ||
| 1165 | case SIOCOUTQ: | ||
| 1166 | case SIOCINQ: | ||
| 1167 | return -ENOIOCTLCMD; | ||
| 1168 | default: | ||
| 1169 | #ifdef CONFIG_IPV6_MROUTE | ||
| 1170 | return ip6mr_compat_ioctl(sk, cmd, compat_ptr(arg)); | ||
| 1171 | #else | ||
| 1172 | return -ENOIOCTLCMD; | ||
| 1173 | #endif | ||
| 1174 | } | ||
| 1175 | } | ||
| 1176 | #endif | ||
| 1177 | |||
| 1160 | static void rawv6_close(struct sock *sk, long timeout) | 1178 | static void rawv6_close(struct sock *sk, long timeout) |
| 1161 | { | 1179 | { |
| 1162 | if (inet_sk(sk)->inet_num == IPPROTO_RAW) | 1180 | if (inet_sk(sk)->inet_num == IPPROTO_RAW) |
| @@ -1215,6 +1233,7 @@ struct proto rawv6_prot = { | |||
| 1215 | #ifdef CONFIG_COMPAT | 1233 | #ifdef CONFIG_COMPAT |
| 1216 | .compat_setsockopt = compat_rawv6_setsockopt, | 1234 | .compat_setsockopt = compat_rawv6_setsockopt, |
| 1217 | .compat_getsockopt = compat_rawv6_getsockopt, | 1235 | .compat_getsockopt = compat_rawv6_getsockopt, |
| 1236 | .compat_ioctl = compat_rawv6_ioctl, | ||
| 1218 | #endif | 1237 | #endif |
| 1219 | }; | 1238 | }; |
| 1220 | 1239 | ||
