]> git.proxmox.com Git - mirror_frr.git/commitdiff
zebra: Set zapi send/receive buffer to a larger value
authorDonald Sharp <sharpd@cumulusnetworks.com>
Wed, 11 Oct 2017 13:16:46 +0000 (09:16 -0400)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Mon, 23 Oct 2017 22:09:23 +0000 (18:09 -0400)
Allow a bit more to buffer before we stop zebra
from sending/receiving.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
zebra/zserv.c

index cb83d32a1f10ec75fcaf7ac4c4a7840b5ac6c2f8..e5439327500b397f84dab6c883ac599937d6a6fe 100644 (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");