diff options
-rw-r--r-- | usr.sbin/ospfd/interface.c | 13 | ||||
-rw-r--r-- | usr.sbin/ospfd/ospfe.c | 4 | ||||
-rw-r--r-- | usr.sbin/ospfd/ospfe.h | 3 |
3 files changed, 17 insertions, 3 deletions
diff --git a/usr.sbin/ospfd/interface.c b/usr.sbin/ospfd/interface.c index 9534244682a..c22420c4779 100644 --- a/usr.sbin/ospfd/interface.c +++ b/usr.sbin/ospfd/interface.c @@ -1,4 +1,4 @@ -/* $OpenBSD: interface.c,v 1.38 2005/10/19 21:43:20 claudio Exp $ */ +/* $OpenBSD: interface.c,v 1.39 2005/12/04 20:49:47 norby Exp $ */ /* * Copyright (c) 2005 Claudio Jeker <claudio@openbsd.org> @@ -737,6 +737,17 @@ if_set_tos(int fd, int tos) return (0); } +void +if_set_recvbuf(int fd) +{ + int bsize; + + bsize = 65535; + while (setsockopt(fd, SOL_SOCKET, SO_RCVBUF, &bsize, + sizeof(bsize)) == -1) + bsize /= 2; +} + int if_join_group(struct iface *iface, struct in_addr *addr) { diff --git a/usr.sbin/ospfd/ospfe.c b/usr.sbin/ospfd/ospfe.c index 50e01f78003..a94e62dbcee 100644 --- a/usr.sbin/ospfd/ospfe.c +++ b/usr.sbin/ospfd/ospfe.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ospfe.c,v 1.33 2005/10/19 21:43:20 claudio Exp $ */ +/* $OpenBSD: ospfe.c,v 1.34 2005/12/04 20:49:47 norby Exp $ */ /* * Copyright (c) 2005 Claudio Jeker <claudio@openbsd.org> @@ -107,6 +107,8 @@ ospfe(struct ospfd_conf *xconf, int pipe_parent2ospfe[2], int pipe_ospfe2rde[2], if (if_set_tos(xconf->ospf_socket, IPTOS_PREC_INTERNETCONTROL) == -1) fatal("if_set_tos"); + if_set_recvbuf(xconf->ospf_socket); + oeconf = xconf; if ((pw = getpwnam(OSPFD_USER)) == NULL) diff --git a/usr.sbin/ospfd/ospfe.h b/usr.sbin/ospfd/ospfe.h index b90e3deba1a..58d9842e99b 100644 --- a/usr.sbin/ospfd/ospfe.h +++ b/usr.sbin/ospfd/ospfe.h @@ -1,4 +1,4 @@ -/* $OpenBSD: ospfe.h,v 1.17 2005/11/04 10:19:16 claudio Exp $ */ +/* $OpenBSD: ospfe.h,v 1.18 2005/12/04 20:49:47 norby Exp $ */ /* * Copyright (c) 2004, 2005 Esben Norby <norby@openbsd.org> @@ -203,6 +203,7 @@ int if_leave_group(struct iface *, struct in_addr *); int if_set_mcast(struct iface *); int if_set_mcast_ttl(int, u_int8_t); int if_set_tos(int, int); +void if_set_recvbuf(int); int if_set_mcast_loop(int); /* lsack.c */ |