summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick McHardy <kaber@trash.net>2006-03-22 21:53:20 (GMT)
committerDavid S. Miller <davem@davemloft.net>2006-03-22 21:53:20 (GMT)
commit443da0d52766ef8ed50b59673ac7ea6aa6e9218c (patch)
tree27cb008a21de0e70b848cc88a8050ce00cb6923d
parent1c2e02750b992703a8a18634e08b04353face243 (diff)
downloadlinux-fsl-qoriq-443da0d52766ef8ed50b59673ac7ea6aa6e9218c.tar.xz
[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.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/ipv6/ipv6_sockglue.c b/net/ipv6/ipv6_sockglue.c
index 602feec..4c20eeb 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;