From f102e75f613af740241dfa7253a2362c7935b9a8 Mon Sep 17 00:00:00 2001 From: Denis Ovsienko Date: Tue, 18 Sep 2007 09:01:13 +0000 Subject: + fix minor regression in OSPF sending buffer adjustment logic --- ospfd/ospfd.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'ospfd/ospfd.c') diff --git a/ospfd/ospfd.c b/ospfd/ospfd.c index 8133050d..a4c4fac3 100644 --- a/ospfd/ospfd.c +++ b/ospfd/ospfd.c @@ -33,6 +33,7 @@ Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA #include "sockunion.h" /* for inet_aton () */ #include "zclient.h" #include "plist.h" +#include "sockopt.h" #include "ospfd/ospfd.h" #include "ospfd/ospf_network.h" @@ -212,8 +213,10 @@ ospf_new (void) "a socket"); exit(1); } - new->maxsndbuflen = 0; - ospf_adjust_sndbuflen (new, OSPF_SNDBUFLEN_DEFAULT); + new->maxsndbuflen = getsockopt_so_sendbuf (new->fd); + if (IS_DEBUG_OSPF (zebra, ZEBRA_INTERFACE)) + zlog_debug ("%s: starting with OSPF send buffer size %d", + __func__, new->maxsndbuflen); if ((new->ibuf = stream_new(OSPF_MAX_PACKET_SIZE+1)) == NULL) { zlog_err("ospf_new: fatal error: stream_new(%u) failed allocating ibuf", -- cgit v1.2.1