lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <dec1f621-a770-4c9a-89e9-e0f26ab470e2@suse.com>
Date: Wed, 12 Mar 2025 14:48:01 +0100
From: Nicolas Morey <nicolas.morey@...e.com>
To: netdev@...r.kernel.org, Eric Dumazet <edumazet@...gle.com>
Subject: [RFC PATCH] net: enable SO_REUSEPORT for AF_TIPC sockets

Commit 5b0af621c3f6 ("net: restrict SO_REUSEPORT to inet sockets") disabled
SO_REUSEPORT for all non inet sockets, including AF_TIPC sockets which broke
one of our customer applications.
Re-enable SO_REUSEPORT for AF_TIPC to restore the original behaviour.

Fixes: 5b0af621c3f6 ("net: restrict SO_REUSEPORT to inet sockets")
Signed-off-by: Nicolas Morey <nmorey@...e.com>
---
 include/net/sock.h | 5 +++++
 net/core/sock.c    | 2 +-
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/include/net/sock.h b/include/net/sock.h
index 7ef728324e4e..d14f6ffedcd5 100644
--- a/include/net/sock.h
+++ b/include/net/sock.h
@@ -2755,6 +2755,11 @@ static inline bool sk_is_vsock(const struct sock *sk)
 	return sk->sk_family == AF_VSOCK;
 }
 
+static inline bool sk_is_tipc(const struct sock *sk)
+{
+	return sk->sk_family == AF_TIPC;
+}
+
 /**
  * sk_eat_skb - Release a skb if it is no longer needed
  * @sk: socket to eat this skb from
diff --git a/net/core/sock.c b/net/core/sock.c
index 6c0e87f97fa4..d4ad4cdff997 100644
--- a/net/core/sock.c
+++ b/net/core/sock.c
@@ -1300,7 +1300,7 @@ int sk_setsockopt(struct sock *sk, int level, int optname,
 		sk->sk_reuse = (valbool ? SK_CAN_REUSE : SK_NO_REUSE);
 		break;
 	case SO_REUSEPORT:
-		if (valbool && !sk_is_inet(sk))
+		if (valbool && !sk_is_inet(sk) && !sk_is_tipc(sk))
 			ret = -EOPNOTSUPP;
 		else
 			sk->sk_reuseport = valbool;
-- 
2.45.2


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ