diff options
Diffstat (limited to 'net')
-rw-r--r-- | net/ipv6/ipv6_sockglue.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/net/ipv6/ipv6_sockglue.c b/net/ipv6/ipv6_sockglue.c index 1334fc174bcf..8c5f80fd03ad 100644 --- a/net/ipv6/ipv6_sockglue.c +++ b/net/ipv6/ipv6_sockglue.c | |||
@@ -1046,7 +1046,7 @@ static int do_ipv6_getsockopt(struct sock *sk, int level, int optname, | |||
1046 | break; | 1046 | break; |
1047 | 1047 | ||
1048 | default: | 1048 | default: |
1049 | return -EINVAL; | 1049 | return -ENOPROTOOPT; |
1050 | } | 1050 | } |
1051 | len = min_t(unsigned int, sizeof(int), len); | 1051 | len = min_t(unsigned int, sizeof(int), len); |
1052 | if(put_user(len, optlen)) | 1052 | if(put_user(len, optlen)) |
@@ -1069,9 +1069,8 @@ int ipv6_getsockopt(struct sock *sk, int level, int optname, | |||
1069 | 1069 | ||
1070 | err = do_ipv6_getsockopt(sk, level, optname, optval, optlen); | 1070 | err = do_ipv6_getsockopt(sk, level, optname, optval, optlen); |
1071 | #ifdef CONFIG_NETFILTER | 1071 | #ifdef CONFIG_NETFILTER |
1072 | /* we need to exclude all possible EINVALs except default case */ | 1072 | /* we need to exclude all possible ENOPROTOOPTs except default case */ |
1073 | if (err == -EINVAL && optname != IPV6_ADDRFORM && | 1073 | if (err == -ENOPROTOOPT && optname != IPV6_2292PKTOPTIONS) { |
1074 | optname != MCAST_MSFILTER) { | ||
1075 | int len; | 1074 | int len; |
1076 | 1075 | ||
1077 | if (get_user(len, optlen)) | 1076 | if (get_user(len, optlen)) |
@@ -1108,9 +1107,8 @@ int compat_ipv6_getsockopt(struct sock *sk, int level, int optname, | |||
1108 | 1107 | ||
1109 | err = do_ipv6_getsockopt(sk, level, optname, optval, optlen); | 1108 | err = do_ipv6_getsockopt(sk, level, optname, optval, optlen); |
1110 | #ifdef CONFIG_NETFILTER | 1109 | #ifdef CONFIG_NETFILTER |
1111 | /* we need to exclude all possible EINVALs except default case */ | 1110 | /* we need to exclude all possible ENOPROTOOPTs except default case */ |
1112 | if (err == -EINVAL && optname != IPV6_ADDRFORM && | 1111 | if (err == -ENOPROTOOPT && optname != IPV6_2292PKTOPTIONS) { |
1113 | optname != MCAST_MSFILTER) { | ||
1114 | int len; | 1112 | int len; |
1115 | 1113 | ||
1116 | if (get_user(len, optlen)) | 1114 | if (get_user(len, optlen)) |