summaryrefslogtreecommitdiffstats
path: root/vtysh/vtysh.c
diff options
context:
space:
mode:
authorDaniel Baumann <daniel@debian.org>2024-12-24 08:32:19 +0100
committerDaniel Baumann <daniel@debian.org>2024-12-24 08:32:19 +0100
commitd1f707efc3252786252b10e49a397d0461710e58 (patch)
treeaa2fc03aa522e5d8494fd6fae2a3fcb588815e3f /vtysh/vtysh.c
parentAdding upstream version 10.2. (diff)
downloadfrr-d1f707efc3252786252b10e49a397d0461710e58.tar.xz
frr-d1f707efc3252786252b10e49a397d0461710e58.zip
Adding upstream version 10.2.1.upstream/10.2.1upstream
Signed-off-by: Daniel Baumann <daniel@debian.org>
Diffstat (limited to 'vtysh/vtysh.c')
-rw-r--r--vtysh/vtysh.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/vtysh/vtysh.c b/vtysh/vtysh.c
index 2d80feef..92f37f19 100644
--- a/vtysh/vtysh.c
+++ b/vtysh/vtysh.c
@@ -39,6 +39,7 @@
#include "frrstr.h"
#include "json.h"
#include "ferr.h"
+#include "sockopt.h"
DEFINE_MTYPE_STATIC(MVTYSH, VTYSH_CMD, "Vtysh cmd copy");
@@ -4694,9 +4695,8 @@ static int vtysh_connect(struct vtysh_client *vclient)
* Increasing the RECEIVE socket buffer size so that the socket can hold
* after receving from other process.
*/
- ret = setsockopt(sock, SOL_SOCKET, SO_RCVBUF, (char *)&rcvbufsize,
- sizeof(rcvbufsize));
- if (ret < 0) {
+ ret = setsockopt_so_recvbuf(sock, rcvbufsize);
+ if (ret <= 0) {
#ifdef DEBUG
fprintf(stderr, "Cannot set socket %d rcv buffer size, %s\n",
sock, safe_strerror(errno));