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/ospf_network.c | |
| parent | 96934e6ac6ec9ff6e67131cc8324741b771d5e0d (diff) | |
+ fix minor regression in OSPF sending buffer adjustment logic
Diffstat (limited to 'ospfd/ospf_network.c')
| -rw-r--r-- | ospfd/ospf_network.c | 12 | 
1 files changed, 6 insertions, 6 deletions
diff --git a/ospfd/ospf_network.c b/ospfd/ospf_network.c index 11155dbcb1..d5bf7493ee 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)  | 
