diff options
author | David S. Miller <davem@davemloft.net> | 2011-02-03 20:59:32 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-02-03 21:05:29 -0500 |
commit | e2d57766e6744f2956975dd2086d82957187b0f6 (patch) | |
tree | 6d7f09ad6eaaac8ad99528cc83894faa6b230b1a /net/ipv6/raw.c | |
parent | ca6b8bb097c8e0ab6bce4fa04584074dee17c0d9 (diff) |
net: Provide compat support for SIOCGETMIFCNT_IN6 and SIOCGETSGCNT_IN6.
Signed-off-by: David S. Miller <davem@davemloft.net>
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 86c39526ba5e..c5b0915d106b 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 | ||