mirror of
https://github.com/systemd/systemd.git
synced 2026-07-20 06:20:28 +00:00
socket-util: Run the fallback when the kernel complains about the null buffer (#3541)
Calling recv with a NULL buffer returns EFAULT instead of EOPNOTSUPP on older kernels (3.14). Fixes #3407 Signed-off-by: Kai Ruhnau <kai.ruhnau@target-sg.com>
This commit is contained in:
committed by
Lennart Poettering
parent
7d38158b5d
commit
77d4acf332
@@ -986,7 +986,7 @@ ssize_t next_datagram_size_fd(int fd) {
|
||||
|
||||
l = recv(fd, NULL, 0, MSG_PEEK|MSG_TRUNC);
|
||||
if (l < 0) {
|
||||
if (errno == EOPNOTSUPP)
|
||||
if (errno == EOPNOTSUPP || errno == EFAULT)
|
||||
goto fallback;
|
||||
|
||||
return -errno;
|
||||
|
||||
Reference in New Issue
Block a user