mirror of
https://github.com/systemd/systemd.git
synced 2024-11-01 17:51:22 +03: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:
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;
|
||||
|
Loading…
Reference in New Issue
Block a user