diff options
author | Florin Coras <fcoras@cisco.com> | 2020-03-24 15:24:29 +0000 |
---|---|---|
committer | Dave Barach <openvpp@barachs.net> | 2020-03-24 18:32:26 +0000 |
commit | 2a6642e95dc18d7c56f87b74a70658b8312b8c08 (patch) | |
tree | 232ad632c544a310df28fa8be8c093582fe8233a /src/vcl/ldp.c | |
parent | eda1b8c32f9857bb749835b0189af002b224927d (diff) |
vcl: fix ldp recv return on error
Type: fix
Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I0875705d3a0c95f2781b0595ef27a30486438aae
Diffstat (limited to 'src/vcl/ldp.c')
-rw-r--r-- | src/vcl/ldp.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/vcl/ldp.c b/src/vcl/ldp.c index d6e81d6b3b9..0dbc6a51efc 100644 --- a/src/vcl/ldp.c +++ b/src/vcl/ldp.c @@ -1502,7 +1502,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 { |