* [PATCH][IPV6]: Compilation fix for compat MCAST_MSFILTER sockopts.
@ 2008-04-30 13:36 Pavel Emelyanov
2008-04-30 14:26 ` David Stevens
0 siblings, 1 reply; 3+ messages in thread
From: Pavel Emelyanov @ 2008-04-30 13:36 UTC (permalink / raw)
To: David Miller; +Cc: David Stevens, Linux Netdev List
The last hunk from the commit dae50295 (ipv4/ipv6 compat: Fix SSM
applications on 64bit kernels.) escaped from the compat_ipv6_setsockopt
to the ipv6_getsockopt (I guess due to patch smartness wrt searching
for context) thus breaking 32-bit and 64-bit-without-compat compilation.
Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
---
diff --git a/net/ipv6/ipv6_sockglue.c b/net/ipv6/ipv6_sockglue.c
index b4a26f2..56d55fe 100644
--- a/net/ipv6/ipv6_sockglue.c
+++ b/net/ipv6/ipv6_sockglue.c
@@ -1089,10 +1089,6 @@ int ipv6_getsockopt(struct sock *sk, int level, int optname,
if(level != SOL_IPV6)
return -ENOPROTOOPT;
- if (optname == MCAST_MSFILTER)
- return compat_mc_getsockopt(sk, level, optname, optval, optlen,
- ipv6_getsockopt);
-
err = do_ipv6_getsockopt(sk, level, optname, optval, optlen);
#ifdef CONFIG_NETFILTER
/* we need to exclude all possible ENOPROTOOPTs except default case */
@@ -1131,6 +1127,10 @@ int compat_ipv6_getsockopt(struct sock *sk, int level, int optname,
if (level != SOL_IPV6)
return -ENOPROTOOPT;
+ if (optname == MCAST_MSFILTER)
+ return compat_mc_getsockopt(sk, level, optname, optval, optlen,
+ ipv6_getsockopt);
+
err = do_ipv6_getsockopt(sk, level, optname, optval, optlen);
#ifdef CONFIG_NETFILTER
/* we need to exclude all possible ENOPROTOOPTs except default case */
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH][IPV6]: Compilation fix for compat MCAST_MSFILTER sockopts.
2008-04-30 13:36 [PATCH][IPV6]: Compilation fix for compat MCAST_MSFILTER sockopts Pavel Emelyanov
@ 2008-04-30 14:26 ` David Stevens
2008-04-30 21:50 ` David Miller
0 siblings, 1 reply; 3+ messages in thread
From: David Stevens @ 2008-04-30 14:26 UTC (permalink / raw)
To: Pavel Emelyanov; +Cc: David Miller, Linux Netdev List
Pavel,
Definitely should be in compat_ipv6_getsockopt() as the original was-- I
hope
your patch doesn't do the same thing when applied!
Good catch!
+-DLS
Acked-by: David L Stevens <dlstevens@us.ibm.com>
netdev-owner@vger.kernel.org wrote on 04/30/2008 06:36:31 AM:
> The last hunk from the commit dae50295 (ipv4/ipv6 compat: Fix SSM
> applications on 64bit kernels.) escaped from the compat_ipv6_setsockopt
> to the ipv6_getsockopt (I guess due to patch smartness wrt searching
> for context) thus breaking 32-bit and 64-bit-without-compat compilation.
>
> Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
>
> ---
>
> diff --git a/net/ipv6/ipv6_sockglue.c b/net/ipv6/ipv6_sockglue.c
> index b4a26f2..56d55fe 100644
> --- a/net/ipv6/ipv6_sockglue.c
> +++ b/net/ipv6/ipv6_sockglue.c
> @@ -1089,10 +1089,6 @@ int ipv6_getsockopt(struct sock *sk, int level,
int optname,
> if(level != SOL_IPV6)
> return -ENOPROTOOPT;
>
> - if (optname == MCAST_MSFILTER)
> - return compat_mc_getsockopt(sk, level, optname, optval, optlen,
> - ipv6_getsockopt);
> -
> err = do_ipv6_getsockopt(sk, level, optname, optval, optlen);
> #ifdef CONFIG_NETFILTER
> /* we need to exclude all possible ENOPROTOOPTs except default case
*/
> @@ -1131,6 +1127,10 @@ int compat_ipv6_getsockopt(struct sock *sk, int
level,
> int optname,
> if (level != SOL_IPV6)
> return -ENOPROTOOPT;
>
> + if (optname == MCAST_MSFILTER)
> + return compat_mc_getsockopt(sk, level, optname, optval, optlen,
> + ipv6_getsockopt);
> +
> err = do_ipv6_getsockopt(sk, level, optname, optval, optlen);
> #ifdef CONFIG_NETFILTER
> /* we need to exclude all possible ENOPROTOOPTs except default case
*/
> --
> To unsubscribe from this list: send the line "unsubscribe netdev" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH][IPV6]: Compilation fix for compat MCAST_MSFILTER sockopts.
2008-04-30 14:26 ` David Stevens
@ 2008-04-30 21:50 ` David Miller
0 siblings, 0 replies; 3+ messages in thread
From: David Miller @ 2008-04-30 21:50 UTC (permalink / raw)
To: dlstevens; +Cc: xemul, netdev
From: David Stevens <dlstevens@us.ibm.com>
Date: Wed, 30 Apr 2008 07:26:29 -0700
> Pavel,
> Definitely should be in compat_ipv6_getsockopt() as the original was-- I
> hope
> your patch doesn't do the same thing when applied!
>
> Good catch!
> +-DLS
>
> Acked-by: David L Stevens <dlstevens@us.ibm.com>
Applied, thanks guys.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2008-04-30 21:50 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-04-30 13:36 [PATCH][IPV6]: Compilation fix for compat MCAST_MSFILTER sockopts Pavel Emelyanov
2008-04-30 14:26 ` David Stevens
2008-04-30 21:50 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).