socket: downgrade not-supported logging for SO_PASSSEC

Kernel 6.16 started returning EOPNOTSUPP when a required kconfig
is disabled. Downgrade to debug level in that case.

Fixes https://github.com/systemd/systemd/issues/37783
This commit is contained in:
Luca Boccassi
2025-06-09 21:51:39 +02:00
committed by Mike Yuan
parent d9af093daf
commit bb887cf22e
3 changed files with 5 additions and 3 deletions
+1 -1
View File
@@ -1075,7 +1075,7 @@ static void socket_apply_socket_options(Socket *s, SocketPort *p, int fd) {
if (s->pass_sec) {
r = setsockopt_int(fd, SOL_SOCKET, SO_PASSSEC, true);
if (r < 0)
log_unit_warning_errno(UNIT(s), r, "SO_PASSSEC failed: %m");
log_unit_full_errno(UNIT(s), ERRNO_IS_NEG_NOT_SUPPORTED(r) ? LOG_DEBUG : LOG_WARNING, r, "SO_PASSSEC failed: %m");
}
if (s->pass_pktinfo) {