Re: reincarnation of bug kern/95665: [if_tun] "ping: sendto: No buffer space available"



2007/7/27, Oleg <agile.quad@xxxxxxxxx>:

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 =/
_______________________________________________
freebsd-net@xxxxxxxxxxx mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-net
To unsubscribe, send any mail to "freebsd-net-unsubscribe@xxxxxxxxxxx"