zebra: Set zapi send/receive buffer to a larger value

Allow a bit more to buffer before we stop zebra
from sending/receiving.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
This commit is contained in:
Donald Sharp 2017-10-11 09:16:46 -04:00
parent bf2394f08b
commit 2c73b25897

View File

@ -40,6 +40,7 @@
#include "nexthop.h"
#include "vrf.h"
#include "libfrr.h"
#include "sockopt.h"
#include "zebra/zserv.h"
#include "zebra/zebra_ns.h"
@ -2574,6 +2575,11 @@ void zebra_zserv_socket_init(char *path)
unlink(suna->sun_path);
}
zserv_privs.change(ZPRIVS_RAISE);
setsockopt_so_recvbuf(sock, 1048576);
setsockopt_so_sendbuf(sock, 1048576);
zserv_privs.change(ZPRIVS_LOWER);
if (sa.ss_family != AF_UNIX && zserv_privs.change(ZPRIVS_RAISE))
zlog_err("Can't raise privileges");