diff options
| author | Donald Sharp <sharpd@cumulusnetworks.com> | 2016-11-17 19:57:10 -0500 | 
|---|---|---|
| committer | Donald Sharp <sharpd@cumulusnetworks.com> | 2016-12-21 20:26:16 -0500 | 
| commit | 55a645a636fbfcd0920775933cd3bb9e51660d4f (patch) | |
| tree | 802118602623dba20451992d364705df6eaf63b1 /pimd/pim_sock.c | |
| parent | 6806e04d04bbf59cff7f7ca96151c334cd95af30 (diff) | |
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 681b5fe5c1..12f222bb80 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;  | 
