Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 443da0d5 authored by Patrick McHardy's avatar Patrick McHardy Committed by David S. Miller
Browse files

[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: default avatarPatrick McHardy <kaber@trash.net>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 1c2e0275
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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;