diff options
author | Patrick McHardy <kaber@trash.net> | 2006-03-22 13:53:20 -0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2006-03-22 13:53:20 -0800 |
commit | 443da0d52766ef8ed50b59673ac7ea6aa6e9218c (patch) | |
tree | 27cb008a21de0e70b848cc88a8050ce00cb6923d | |
parent | 1c2e02750b992703a8a18634e08b04353face243 (diff) | |
download | linux-3.10-443da0d52766ef8ed50b59673ac7ea6aa6e9218c.tar.gz linux-3.10-443da0d52766ef8ed50b59673ac7ea6aa6e9218c.tar.bz2 linux-3.10-443da0d52766ef8ed50b59673ac7ea6aa6e9218c.zip |
[NETFILTER]: Fix ip6tables breakage from {get,set}sockopt compat layer
do_ipv6_getsockopt returns -EINVAL for unknown options, not
-ENOPROTOOPT as do_ipv6_setsockopt.
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | net/ipv6/ipv6_sockglue.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/ipv6/ipv6_sockglue.c b/net/ipv6/ipv6_sockglue.c index 602feec4773..4c20eeb3d56 100644 --- a/net/ipv6/ipv6_sockglue.c +++ b/net/ipv6/ipv6_sockglue.c @@ -907,7 +907,7 @@ int ipv6_getsockopt(struct sock *sk, int level, int optname, err = do_ipv6_getsockopt(sk, level, optname, optval, optlen); #ifdef CONFIG_NETFILTER /* we need to exclude all possible EINVALs except default case */ - if (err == -ENOPROTOOPT && optname != IPV6_ADDRFORM && + if (err == -EINVAL && optname != IPV6_ADDRFORM && optname != MCAST_MSFILTER) { int len; @@ -944,7 +944,7 @@ int compat_ipv6_getsockopt(struct sock *sk, int level, int optname, err = do_ipv6_getsockopt(sk, level, optname, optval, optlen); #ifdef CONFIG_NETFILTER /* we need to exclude all possible EINVALs except default case */ - if (err == -ENOPROTOOPT && optname != IPV6_ADDRFORM && + if (err == -EINVAL && optname != IPV6_ADDRFORM && optname != MCAST_MSFILTER) { int len; |