Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 31 Jul 2007 15:07:03 +0300
From:      Oleg <agile.quad@gmail.com>
To:        freebsd-net@freebsd.org
Subject:   Re: reincarnation of bug kern/95665: [if_tun] "ping: sendto: No buffer space available"
Message-ID:  <d0fcb8ea0707310507x63a8364fm2c7f2f452ebbaab0@mail.gmail.com>
In-Reply-To: <d0fcb8ea0707270635k5c260c8fvf0dc55257782591b@mail.gmail.com>
References:  <d0fcb8ea0707270635k5c260c8fvf0dc55257782591b@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
2007/7/27, Oleg <agile.quad@gmail.com>:
>
> Hi All,
>
> I can reproduce this bug easly with tap echo server (attached here), that
> I was small reworked.
>
> steps (almost same):
> (All ip addresses/macs hardcoded in code).
>
> On first machine run echo server, on second add
>
> root@pc2# route add -net 192.168.125.1/24 ip-addr-of-first-machine
>
> and
>
> root@pc2# ping -f -n  192.168.125.2
>
> While flood pinging, on first machine run ping for checking:
>
> root@pc1#  ping 192.168.125.2
> PING 192.168.125.2 ( 192.168.125.2): 56 data bytes
> 64 bytes from 192.168.125.2 : icmp_seq=0 ttl=64 time=0.554 ms
> 64 bytes from 192.168.125.2: icmp_seq=1 ttl=64 time=0.180 ms
> ...
> wait for a while
> ...
> ping: sendto: No buffer space available
> ping: sendto: No buffer space available
> ping: sendto: No buffer space available
>
> With best regards,
>     Oleg Dolgov.
>
>
I find ugly solution: if
in echo tap server we add select before read, all work perfectly!
...
while (1)
{
      if (select(tap_fd+1, &fd, NULL, NULL, NULL) == -1) {
            break;
      }

      if ((ip_pkt_len = read(tap_fd, buf, sizeof(buf))) == -1) {
            break;
      }

      ...
...
I don't have any ideas, why this hack fix trouble..
p.s. a few more details look here
http://lists.freebsd.org/pipermail/freebsd-net/2007-April/014064.html

p.p.s. bug reproduce on FreeBSD 6.2-RELEASE, but can't on FreeBSD
7.0-CURRENT =/



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?d0fcb8ea0707310507x63a8364fm2c7f2f452ebbaab0>