aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2020-03-24 15:24:29 +0000
committerAndrew Yourtchenko <ayourtch@gmail.com>2020-08-13 10:39:40 +0000
commit8d3ba7eab43e6d24b84d6628ece20fd2d2c5b581 (patch)
treeeba6a3c58d1591a56bde4cd5bbbce4baf1b4c81c
parenta086cb867407660558b3c7ed6690738ff3240cea (diff)
vcl: fix ldp recv return on error
Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I0875705d3a0c95f2781b0595ef27a30486438aae (cherry picked from commit 2a6642e95dc18d7c56f87b74a70658b8312b8c08)
-rw-r--r--src/vcl/ldp.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/vcl/ldp.c b/src/vcl/ldp.c
index 47ad0f8a9e1..3944239ec1a 100644
--- a/src/vcl/ldp.c
+++ b/src/vcl/ldp.c
@@ -1501,7 +1501,10 @@ recv (int fd, void *buf, size_t n, int flags)
{
size = vls_recvfrom (vlsh, buf, n, flags, NULL);
if (size < 0)
- errno = -size;
+ {
+ errno = -size;
+ size = -1;
+ }
}
else
{