diff options
author | Donald Sharp <sharpd@cumulusnetworks.com> | 2016-11-18 01:57:10 +0100 |
---|---|---|
committer | Donald Sharp <sharpd@cumulusnetworks.com> | 2016-12-22 02:26:16 +0100 |
commit | 55a645a636fbfcd0920775933cd3bb9e51660d4f (patch) | |
tree | 802118602623dba20451992d364705df6eaf63b1 /pimd/pim_sock.c | |
parent | pimd: Modify mroute_read to be non-blocking (diff) | |
download | frr-55a645a636fbfcd0920775933cd3bb9e51660d4f.tar.xz frr-55a645a636fbfcd0920775933cd3bb9e51660d4f.zip |
pimd: Set pim socket receive buffer to a larger value
There exists situations where we can receive data
faster than we can process it. Make the buffer
large enough to catch these situations for
the pim sockets.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Diffstat (limited to 'pimd/pim_sock.c')
-rw-r--r-- | pimd/pim_sock.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/pimd/pim_sock.c b/pimd/pim_sock.c index 681b5fe5c..12f222bb8 100644 --- a/pimd/pim_sock.c +++ b/pimd/pim_sock.c @@ -113,6 +113,7 @@ pim_socket_bind (int fd, struct interface *ifp) int pim_socket_mcast(int protocol, struct in_addr ifaddr, int ifindex, u_char loop) { + int rcvbuf = 1024 * 1024 * 8; struct ip_mreqn mreq; int fd; @@ -225,6 +226,10 @@ int pim_socket_mcast(int protocol, struct in_addr ifaddr, int ifindex, u_char lo return PIM_SOCK_ERR_IFACE; } + if (setsockopt(fd, SOL_SOCKET, SO_RCVBUF, &rcvbuf, sizeof(rcvbuf))) + zlog_warn("%s: Failure to set buffer size to %d", + __PRETTY_FUNCTION__, rcvbuf); + { long flags; |