mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-14 16:04:49 +00:00
2004-09-17 Paul Jakma <paul@dishone.st>
* ripngd/ripngd.c: move setsockopt_so_recvbuf to lib. * lib/sockopt.{c,h}: Add setsockopt_so_recvbuf, for ripd and ripngd. * ripd/ripd.c: set receive buffer to a decent size, some systems have low defaults. Problem noted and fix suggested by Stephan Schweizer in [zebra 20967].
This commit is contained in:
parent
bf731011ef
commit
0b3acf4f94
@ -1,3 +1,7 @@
|
|||||||
|
2004-09-17 Paul Jakma <paul@dishone.st>
|
||||||
|
|
||||||
|
* sockopt.{c,h}: Add setsockopt_so_recvbuf, for ripd and ripngd.
|
||||||
|
|
||||||
2004-09-13 Paul Jakma <paul@dishone.st>
|
2004-09-13 Paul Jakma <paul@dishone.st>
|
||||||
|
|
||||||
* command.c: Update the copyright string in the default motd.
|
* command.c: Update the copyright string in the default motd.
|
||||||
|
@ -23,6 +23,18 @@
|
|||||||
#include "log.h"
|
#include "log.h"
|
||||||
#include "sockopt.h"
|
#include "sockopt.h"
|
||||||
|
|
||||||
|
int
|
||||||
|
setsockopt_so_recvbuf (int sock, int size)
|
||||||
|
{
|
||||||
|
int ret;
|
||||||
|
|
||||||
|
if ( (ret = setsockopt (sock, SOL_SOCKET, SO_RCVBUF, (char *)
|
||||||
|
&size, sizeof (int)) < 0);
|
||||||
|
zlog_err ("can't setsockopt SO_RCVBUF");
|
||||||
|
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
static void *
|
static void *
|
||||||
getsockopt_cmsg_data (struct msghdr *msgh, int level, int type)
|
getsockopt_cmsg_data (struct msghdr *msgh, int level, int type)
|
||||||
{
|
{
|
||||||
|
@ -22,6 +22,8 @@
|
|||||||
#ifndef _ZEBRA_SOCKOPT_H
|
#ifndef _ZEBRA_SOCKOPT_H
|
||||||
#define _ZEBRA_SOCKOPT_H
|
#define _ZEBRA_SOCKOPT_H
|
||||||
|
|
||||||
|
int setsockopt_so_recvbuf (int sock, int size);
|
||||||
|
|
||||||
#ifdef HAVE_IPV6
|
#ifdef HAVE_IPV6
|
||||||
int setsockopt_ipv6_pktinfo (int, int);
|
int setsockopt_ipv6_pktinfo (int, int);
|
||||||
int setsockopt_ipv6_checksum (int, int);
|
int setsockopt_ipv6_checksum (int, int);
|
||||||
|
@ -1,3 +1,9 @@
|
|||||||
|
2004-09-17 Paul Jakma <paul@dishone.st>
|
||||||
|
|
||||||
|
* ripd.c: set receive buffer to a decent size, some systems have low
|
||||||
|
defaults. Problem noted and fix suggested by Stephan Schweizer
|
||||||
|
in [zebra 20967].
|
||||||
|
|
||||||
2004-08-19 Paul Jakma <paul@dishone.st>
|
2004-08-19 Paul Jakma <paul@dishone.st>
|
||||||
|
|
||||||
* rip_interface.c: (rip_interface_multicast_set) get rid
|
* rip_interface.c: (rip_interface_multicast_set) get rid
|
||||||
|
@ -42,6 +42,10 @@
|
|||||||
#include "ripd/ripd.h"
|
#include "ripd/ripd.h"
|
||||||
#include "ripd/rip_debug.h"
|
#include "ripd/rip_debug.h"
|
||||||
|
|
||||||
|
/* UDP receive buffer size */
|
||||||
|
#define RIP_UDP_RCV_BUF 41600
|
||||||
|
|
||||||
|
/* privileges global */
|
||||||
extern struct zebra_privs_t ripd_privs;
|
extern struct zebra_privs_t ripd_privs;
|
||||||
|
|
||||||
/* RIP Structure. */
|
/* RIP Structure. */
|
||||||
@ -1977,6 +1981,7 @@ rip_create_socket ()
|
|||||||
sockopt_broadcast (sock);
|
sockopt_broadcast (sock);
|
||||||
sockopt_reuseaddr (sock);
|
sockopt_reuseaddr (sock);
|
||||||
sockopt_reuseport (sock);
|
sockopt_reuseport (sock);
|
||||||
|
setsockopt_so_recvbuf (sock, RIP_UDP_RCV_BUF);
|
||||||
#ifdef RIP_RECVMSG
|
#ifdef RIP_RECVMSG
|
||||||
setsockopt_pktinfo (sock);
|
setsockopt_pktinfo (sock);
|
||||||
#endif /* RIP_RECVMSG */
|
#endif /* RIP_RECVMSG */
|
||||||
|
@ -1,3 +1,7 @@
|
|||||||
|
2004-09-17 Paul Jakma <paul@dishone.st>
|
||||||
|
|
||||||
|
* ripngd.c: move setsockopt_so_recvbuf to lib.
|
||||||
|
|
||||||
2004-07-23 Hasso Tepper <hasso@estpak.ee>
|
2004-07-23 Hasso Tepper <hasso@estpak.ee>
|
||||||
|
|
||||||
* ripng_interface.c, ripng_nexthop.c: use ifp->mtu6 instead of
|
* ripng_interface.c, ripng_nexthop.c: use ifp->mtu6 instead of
|
||||||
|
@ -107,17 +107,6 @@ ripng_info_free (struct ripng_info *rinfo)
|
|||||||
XFREE (MTYPE_RIPNG_ROUTE, rinfo);
|
XFREE (MTYPE_RIPNG_ROUTE, rinfo);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
|
||||||
setsockopt_so_recvbuf (int sock, int size)
|
|
||||||
{
|
|
||||||
int ret;
|
|
||||||
|
|
||||||
ret = setsockopt (sock, SOL_SOCKET, SO_RCVBUF, (char *) &size, sizeof (int));
|
|
||||||
if (ret < 0)
|
|
||||||
zlog (NULL, LOG_ERR, "can't setsockopt SO_RCVBUF");
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Create ripng socket. */
|
/* Create ripng socket. */
|
||||||
int
|
int
|
||||||
ripng_make_socket (void)
|
ripng_make_socket (void)
|
||||||
|
Loading…
Reference in New Issue
Block a user