aboutsummaryrefslogtreecommitdiffstats
path: root/src/vcl/ldp.c
diff options
context:
space:
mode:
authorSivaprasad Tummala <Sivaprasad.Tummala@intel.com>2021-07-31 21:38:19 +0530
committerSivaprasad Tummala <Sivaprasad.Tummala@intel.com>2021-07-31 21:55:11 +0530
commitfdcbd38dc14d13e9aa463f28423cc0cc33c2768b (patch)
tree68cc3acec1aa457fa14bcacedda7df75c796bcb5 /src/vcl/ldp.c
parent7f347c13dfb39aac1d2507068a2b6ae2baa09af4 (diff)
vcl: fix ldp for __recv_chk socket calls
add ldp support for handling __recv_chk socket calls. Type: fix Signed-off-by: Sivaprasad Tummala <Sivaprasad.Tummala@intel.com> Change-Id: I33221c465ac607bc665fcba500dd399a56b32df6
Diffstat (limited to 'src/vcl/ldp.c')
-rw-r--r--src/vcl/ldp.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/vcl/ldp.c b/src/vcl/ldp.c
index 5edb935006f..de886ca95b9 100644
--- a/src/vcl/ldp.c
+++ b/src/vcl/ldp.c
@@ -1530,6 +1530,15 @@ recv (int fd, void *buf, size_t n, int flags)
return size;
}
+ssize_t
+__recv_chk (int fd, void *buf, size_t n, size_t buflen, int flags)
+{
+ if (n > buflen)
+ return -1;
+
+ return recv (fd, buf, n, flags);
+}
+
static int
ldp_vls_sendo (vls_handle_t vlsh, const void *buf, size_t n, int flags,
__CONST_SOCKADDR_ARG addr, socklen_t addr_len)