aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv6
diff options
context:
space:
mode:
authorPatrick McHardy <kaber@trash.net>2006-03-22 16:53:20 -0500
committerDavid S. Miller <davem@davemloft.net>2006-03-22 16:53:20 -0500
commit443da0d52766ef8ed50b59673ac7ea6aa6e9218c (patch)
tree27cb008a21de0e70b848cc88a8050ce00cb6923d /net/ipv6
parent1c2e02750b992703a8a18634e08b04353face243 (diff)
[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>
Diffstat (limited to 'net/ipv6')
-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 602feec47738..4c20eeb3d568 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,
907 err = do_ipv6_getsockopt(sk, level, optname, optval, optlen); 907 err = do_ipv6_getsockopt(sk, level, optname, optval, optlen);
908#ifdef CONFIG_NETFILTER 908#ifdef CONFIG_NETFILTER
909 /* we need to exclude all possible EINVALs except default case */ 909 /* we need to exclude all possible EINVALs except default case */
910 if (err == -ENOPROTOOPT && optname != IPV6_ADDRFORM && 910 if (err == -EINVAL && optname != IPV6_ADDRFORM &&
911 optname != MCAST_MSFILTER) { 911 optname != MCAST_MSFILTER) {
912 int len; 912 int len;
913 913
@@ -944,7 +944,7 @@ int compat_ipv6_getsockopt(struct sock *sk, int level, int optname,
944 err = do_ipv6_getsockopt(sk, level, optname, optval, optlen); 944 err = do_ipv6_getsockopt(sk, level, optname, optval, optlen);
945#ifdef CONFIG_NETFILTER 945#ifdef CONFIG_NETFILTER
946 /* we need to exclude all possible EINVALs except default case */ 946 /* we need to exclude all possible EINVALs except default case */
947 if (err == -ENOPROTOOPT && optname != IPV6_ADDRFORM && 947 if (err == -EINVAL && optname != IPV6_ADDRFORM &&
948 optname != MCAST_MSFILTER) { 948 optname != MCAST_MSFILTER) {
949 int len; 949 int len;
950 950