net: Provide compat support for SIOCGETMIFCNT_IN6 and SIOCGETSGCNT_IN6.
Subsystems (3)
David Miller
maintainerPATCH 1/1 net: Provide compat support for SIOCGETMIFCNT_IN6 and SIOCGETSGCNT_IN6.
Signed-off-by David S. Miller <[email protected]>
--- include/linux/mroute6.h | 1 + net/ipv6/ip6mr.c | 74 +++++++++++++++++++++++++++++++++++++++++++++++ net/ipv6/raw.c | 18 +++++++++++ 3 files changed, 93 insertions(+), 0 deletions(-)
include/linux/mroute6.h +1 -0
@@ -136,6 +136,7 @@ extern int ip6_mroute_setsockopt(struct sock *, int, char __user *, unsigned intextern int ip6_mroute_getsockopt (struct sock *,int ,char __user *,int __user *);extern int ip6_mr_input (struct sk_buff *skb);extern int ip6mr_ioctl (struct sock *sk,int cmd,void __user *arg); +extern int ip6mr_compat_ioctl (struct sock *sk,unsigned int cmd,void __user *arg);extern int ip6_mr_init (void );extern void ip6_mr_cleanup (void );#else
net/ipv6/ip6mr.c +74 -0
80 lines not on this page · raw message
net/ipv6/raw.c +18 -0
@@ -1157,6 +1157,23 @@ static int rawv6_ioctl(struct sock *sk, int cmd, unsigned long arg) } } +#ifdef CONFIG_COMPAT +static int compat_rawv6_ioctl (struct sock *sk,unsigned int cmd,unsigned long arg) +{ +switch (cmd) { +case SIOCOUTQ : +case SIOCINQ : +return -ENOIOCTLCMD ; +default : +#ifdef CONFIG_IPV6_MROUTE +return ipmr6_compat_ioctl (sk, cmd,compat_ptr (arg)); +#else +return -ENOIOCTLCMD ; +#endif + } +} +#endif +static void rawv6_close (struct sock *sk,long timeout) {if (inet_sk (sk)->inet_num ==IPPROTO_RAW )
@@ -1215,6 +1232,7 @@ struct proto rawv6_prot = {#ifdef CONFIG_COMPAT .compat_setsockopt = compat_rawv6_setsockopt, .compat_getsockopt = compat_rawv6_getsockopt, + .compat_ioctl = compat_rawv6_ioctl,#endif };
Signature · 1 line
1.7.4
David Miller
maintainerFrom: David Miller <[email protected]>
Date: Thu, 03 Feb 2011 17:54:48 -0800 (PST)
Quoted 7 lines
Signed-off-by David S. Miller <[email protected]>--- include/linux/mroute6.h | 1 + net/ipv6/ip6mr.c | 74 +++++++++++++++++++++++++++++++++++++++++++++++ net/ipv6/raw.c | 18 +++++++++++ 3 files changed, 93 insertions(+), 0 deletions(-)
Build testing on x86_64 showed that net/ipv6/raw.c needs a linux/compat.h include. I've made that change in my local repo.
Quoted 2 lines · David Miller
Signed-off-by David S. Miller <[email protected]>
Looks correct.
Reviewed-by Arnd Bergmann <[email protected]>