From owner-freebsd-net@FreeBSD.ORG Tue Jul 31 12:07:05 2007 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E204116A421 for ; Tue, 31 Jul 2007 12:07:05 +0000 (UTC) (envelope-from agile.quad@gmail.com) Received: from ik-out-1112.google.com (ik-out-1112.google.com [66.249.90.176]) by mx1.freebsd.org (Postfix) with ESMTP id 517E213C4A6 for ; Tue, 31 Jul 2007 12:07:05 +0000 (UTC) (envelope-from agile.quad@gmail.com) Received: by ik-out-1112.google.com with SMTP id c21so1160644ika for ; Tue, 31 Jul 2007 05:07:04 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=RqEEV7pqbJu+lNPorWot3o/igeeMBhyGYU86Mlc6si1ZX/Sht+E4xipSzMvSEONZuz+QrT4RSYYvAgF0k1ZNALTqrzal9W9t3I9c4BinNEmruNec8ctLa6RTcenIT5oP/U00axIxKdPRP6231GEqujMwX2P9sWuECwBmODhVOJE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=e5a1s6HqKR6KLa2CoOvmbWqyCepUbO8VUiIwAnOPgoNJpFy9dBiIMq8B0TDSdCgrmfHZQ1lDgDNNcrX9OptHa4mgubvJSBEscfl16gs347XpC3x/OxNLDakY0QDf4nbb/57P23ZZF3+uDS2TTPiHxR0AnT54a9y1RVPM+uqtDYE= Received: by 10.78.201.2 with SMTP id y2mr1769005huf.1185883623469; Tue, 31 Jul 2007 05:07:03 -0700 (PDT) Received: by 10.78.137.9 with HTTP; Tue, 31 Jul 2007 05:07:03 -0700 (PDT) Message-ID: Date: Tue, 31 Jul 2007 15:07:03 +0300 From: Oleg To: freebsd-net@freebsd.org In-Reply-To: MIME-Version: 1.0 References: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: Re: reincarnation of bug kern/95665: [if_tun] "ping: sendto: No buffer space available" X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Jul 2007 12:07:06 -0000 2007/7/27, Oleg : > > 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 =/