mirror of
https://github.com/systemd/systemd-stable.git
synced 2025-01-06 13:17:44 +03:00
socket: downgrade log warnings about inability to set socket buffer sizes
In containers we might lack the privs to up the socket buffers. Let's
not complain so loudly about that. Let's hence downgrade this to debug
logging if it's a permission problem.
(This wasn't an issue before b92f350789
because back then the failures wouldn't be detected at all.)
This commit is contained in:
parent
e742ec6abc
commit
35b4e3c1bc
@ -1061,13 +1061,15 @@ static void socket_apply_socket_options(Socket *s, SocketPort *p, int fd) {
|
||||
if (s->receive_buffer > 0) {
|
||||
r = fd_set_rcvbuf(fd, s->receive_buffer, false);
|
||||
if (r < 0)
|
||||
log_unit_warning_errno(UNIT(s), r, "SO_RCVBUF/SO_RCVBUFFORCE failed: %m");
|
||||
log_unit_full_errno(UNIT(s), ERRNO_IS_PRIVILEGE(r) ? LOG_DEBUG : LOG_WARNING, r,
|
||||
"SO_RCVBUF/SO_RCVBUFFORCE failed: %m");
|
||||
}
|
||||
|
||||
if (s->send_buffer > 0) {
|
||||
r = fd_set_sndbuf(fd, s->send_buffer, false);
|
||||
if (r < 0)
|
||||
log_unit_warning_errno(UNIT(s), r, "SO_SNDBUF/SO_SNDBUFFORCE failed: %m");
|
||||
log_unit_full_errno(UNIT(s), ERRNO_IS_PRIVILEGE(r) ? LOG_DEBUG : LOG_WARNING, r,
|
||||
"SO_SNDBUF/SO_SNDBUFFORCE failed: %m");
|
||||
}
|
||||
|
||||
if (s->mark >= 0) {
|
||||
|
Loading…
Reference in New Issue
Block a user