Commit 809917903127804c2b2ac76342ab0f29f4b394d3

Authored by Pavel Emelyanov
Committed by David S. Miller
1 parent 159131149c

ipv6: Compilation fix for compat MCAST_MSFILTER sockopts.

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>
Acked-by: David L Stevens <dlstevens@us.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

Showing 1 changed file with 4 additions and 4 deletions Side-by-side Diff

net/ipv6/ipv6_sockglue.c
... ... @@ -1089,10 +1089,6 @@
1089 1089 if(level != SOL_IPV6)
1090 1090 return -ENOPROTOOPT;
1091 1091  
1092   - if (optname == MCAST_MSFILTER)
1093   - return compat_mc_getsockopt(sk, level, optname, optval, optlen,
1094   - ipv6_getsockopt);
1095   -
1096 1092 err = do_ipv6_getsockopt(sk, level, optname, optval, optlen);
1097 1093 #ifdef CONFIG_NETFILTER
1098 1094 /* we need to exclude all possible ENOPROTOOPTs except default case */
... ... @@ -1130,6 +1126,10 @@
1130 1126  
1131 1127 if (level != SOL_IPV6)
1132 1128 return -ENOPROTOOPT;
  1129 +
  1130 + if (optname == MCAST_MSFILTER)
  1131 + return compat_mc_getsockopt(sk, level, optname, optval, optlen,
  1132 + ipv6_getsockopt);
1133 1133  
1134 1134 err = do_ipv6_getsockopt(sk, level, optname, optval, optlen);
1135 1135 #ifdef CONFIG_NETFILTER