Changeset 43a88c5d8b1393c3016a9639e2e8812dd203bbf6

Show
Ignore:
Timestamp:
03/14/08 04:25:54 (6 years ago)
Author:
Theo Schlossnagle <jesus@omniti.com>
git-committer:
Theo Schlossnagle <jesus@omniti.com> 1205468754 +0000
git-parent:

[4cdbcdb30a697d3227b7be9d7deed71656552d22]

git-author:
Theo Schlossnagle <jesus@omniti.com> 1205468754 +0000
Message:

increase he buffer size

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • src/modules/ping_icmp.c

    r9a6060c r43a88c5  
    239239  } 
    240240  else { 
     241    socklen_t slen = sizeof(on); 
     242    if(getsockopt(data->ipv4_fd, SOL_SOCKET, SO_SNDBUF, &on, &slen) == 0) { 
     243      while(on < (1 << 20)) { 
     244        on <<= 1; 
     245        if(setsockopt(data->ipv4_fd, SOL_SOCKET, SO_SNDBUF, 
     246                      &on, sizeof(on)) != 0) { 
     247          on >>= 1; 
     248          break; 
     249        } 
     250      } 
     251      noitL(noit_error, "ping_icmp: send buffer set to %d\n", on); 
     252    } 
     253    else 
     254      noitL(noit_error, "Cannot get sndbuf size: %s\n", strerror(errno)); 
     255 
    241256    on = 1; 
    242257    if(ioctl(data->ipv4_fd, FIONBIO, &on)) {