diff options
author | Denis Ovsienko <linux@pilot.org.ua> | 2007-09-18 09:01:13 +0000 |
---|---|---|
committer | Denis Ovsienko <linux@pilot.org.ua> | 2007-09-18 09:01:13 +0000 |
commit | f102e75f613af740241dfa7253a2362c7935b9a8 (patch) | |
tree | 800da79542d21e3734c4370b33cbb1f474714b55 /ospfd/ospfd.c | |
parent | 96934e6ac6ec9ff6e67131cc8324741b771d5e0d (diff) |
+ fix minor regression in OSPF sending buffer adjustment logic
Diffstat (limited to 'ospfd/ospfd.c')
-rw-r--r-- | ospfd/ospfd.c | 7 |
1 files changed, 5 insertions, 2 deletions
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", |