summaryrefslogtreecommitdiff
path: root/src/basic/socket-util.c
diff options
context:
space:
mode:
authorKai Ruhnau <Kai.Ruhnau@live.com>2016-06-15 12:33:24 +0200
committerLennart Poettering <lennart@poettering.net>2016-06-15 12:33:24 +0200
commit77d4acf332abd24025f31455f492fa83d97cb2e1 (patch)
tree75a4fc4f3f4be71aa6f80570ccf1eec7fe03968b /src/basic/socket-util.c
parent7d38158b5dfcbb5386789eef7a2befea4c72115f (diff)
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>
Diffstat (limited to 'src/basic/socket-util.c')
-rw-r--r--src/basic/socket-util.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/basic/socket-util.c b/src/basic/socket-util.c
index 2aa4daca49..385c3e4df3 100644
--- a/src/basic/socket-util.c
+++ b/src/basic/socket-util.c
@@ -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;