summaryrefslogtreecommitdiffstats
path: root/lib/zclient.c
diff options
context:
space:
mode:
authorRenato Westphal <renato@opensourcerouting.org>2019-04-08 18:08:00 +0200
committerRenato Westphal <renato@opensourcerouting.org>2019-04-08 18:11:28 +0200
commit338b8e914ab1dc30f56f5bcbabd525d547bbc1ea (patch)
tree472af15e5b3fbdf331da8b18ff653cfa24fe2784 /lib/zclient.c
parentMerge pull request #4101 from pacovn/doc_typo1 (diff)
downloadfrr-338b8e914ab1dc30f56f5bcbabd525d547bbc1ea.tar.xz
frr-338b8e914ab1dc30f56f5bcbabd525d547bbc1ea.zip
*: setting the socket send/recv buffer sizes doesn't need elevated privs
The less code running under elevated privileges the better. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
Diffstat (limited to 'lib/zclient.c')
-rw-r--r--lib/zclient.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/lib/zclient.c b/lib/zclient.c
index 92a9d5ef3..e5cab9e0f 100644
--- a/lib/zclient.c
+++ b/lib/zclient.c
@@ -212,10 +212,7 @@ int zclient_socket_connect(struct zclient *zclient)
return -1;
set_cloexec(sock);
-
- frr_elevate_privs(zclient->privs) {
- setsockopt_so_sendbuf(sock, 1048576);
- }
+ setsockopt_so_sendbuf(sock, 1048576);
/* Connect to zebra. */
ret = connect(sock, (struct sockaddr *)&zclient_addr, zclient_addr_len);