vcl: fix ldp recv return on error 66/28366/1
authorFlorin Coras <fcoras@cisco.com>
Tue, 24 Mar 2020 15:24:29 +0000 (15:24 +0000)
committerAndrew Yourtchenko <ayourtch@gmail.com>
Thu, 13 Aug 2020 10:39:40 +0000 (10:39 +0000)
Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I0875705d3a0c95f2781b0595ef27a30486438aae
(cherry picked from commit 2a6642e95dc18d7c56f87b74a70658b8312b8c08)

src/vcl/ldp.c

index 47ad0f8..3944239 100644 (file)
@@ -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
     {