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/ospf_network.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'ospfd/ospf_network.c') diff --git a/ospfd/ospf_network.c b/ospfd/ospf_network.c index 11155dbc..d5bf7493 100644 --- a/ospfd/ospf_network.c +++ b/ospfd/ospf_network.c @@ -249,15 +249,15 @@ ospf_adjust_sndbuflen (struct ospf * ospf, int buflen) zlog_err ("%s: could not raise privs, %s", __func__, safe_strerror (errno)); /* Now we try to set SO_SNDBUF to what our caller has requested - * (OSPF_SNDBUFLEN_DEFAULT initially, which seems to be a sane - * default; or the MTU of a newly added interface). However, - * if the OS has truncated the actual buffer size to somewhat - * less or bigger size, try to detect it and update our records - * appropriately. + * (the MTU of a newly added interface). However, if the OS has + * truncated the actual buffer size to somewhat less size, try + * to detect it and update our records appropriately. The OS + * may allocate more buffer space, than requested, this isn't + * a error. */ ret = setsockopt_so_sendbuf (ospf->fd, buflen); newbuflen = getsockopt_so_sendbuf (ospf->fd); - if (ret < 0 || newbuflen != buflen) + if (ret < 0 || newbuflen < buflen) zlog_warn ("%s: tried to set SO_SNDBUF to %d, but got %d", __func__, buflen, newbuflen); if (newbuflen >= 0) -- cgit v1.2.1