From owner-freebsd-net@FreeBSD.ORG Sat Jan 13 01:37:28 2007 Return-Path: X-Original-To: freebsd-net@freebsd.org Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 6216316A412 for ; Sat, 13 Jan 2007 01:37:28 +0000 (UTC) (envelope-from hugme2@gmail.com) Received: from ug-out-1314.google.com (ug-out-1314.google.com [66.249.92.168]) by mx1.freebsd.org (Postfix) with ESMTP id ECB3813C457 for ; Sat, 13 Jan 2007 01:37:27 +0000 (UTC) (envelope-from hugme2@gmail.com) Received: by ug-out-1314.google.com with SMTP id o2so853889uge for ; Fri, 12 Jan 2007 17:37:26 -0800 (PST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version:content-type:references:x-google-sender-auth; b=jB5lPyiBzMld4HdFgs17IrA4EV7tv7bJ0S9oEWiFM+zitfNpUkiaNStP7rAEYP0Uw6B60QQ5uSr8D51zBxnMGc23c1fzvW+JiUw0vMBbQGq6JaTZlEvbYk36Pu+rEPHXns3dnlSeXiYmaNgwxlqTd8iIlmBVAu4lOReltfGrMjo= Received: by 10.78.185.15 with SMTP id i15mr936707huf.1168652246358; Fri, 12 Jan 2007 17:37:26 -0800 (PST) Received: by 10.78.178.2 with HTTP; Fri, 12 Jan 2007 17:37:26 -0800 (PST) Message-ID: Date: Fri, 12 Jan 2007 20:37:26 -0500 From: "Hug Me" Sender: hugme2@gmail.com To: "Bruce M. Simpson" In-Reply-To: <45A807F8.7080603@FreeBSD.org> MIME-Version: 1.0 References: <20070112163057.2a3ec8f0.rnsanchez@wait4.org> <45A807F8.7080603@FreeBSD.org> X-Google-Sender-Auth: 59f8b8096eaa5730 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: freebsd-net@freebsd.org, Ricardo Nabinger Sanchez Subject: Re: Problem with port 0 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: Sat, 13 Jan 2007 01:37:28 -0000 This is what I thought at first as well. However as I mentioned I used 2 different tftp servers. I tried the yale version with and without inetd. I will get a full packet capture and attach it to my next e-mail. it's possible that it has nothing to do with the traffic being source port 0, that was only the most obvious difference I could find between the normal and dropped traffic. On 1/12/07, Bruce M. Simpson wrote: > > Ricardo Nabinger Sanchez wrote: > > On Fri, 12 Jan 2007 12:03:17 -0500 > > "Hug Me" wrote: > > > > > >> We believe FreeBSD is not allowing a UDP source port of 0 and the > kernel is > >> dropping the packet before it ever reaches the tftp server but are > unable to > >> verify this hypothesis. I was hoping someone here could help shed some > light > >> on the problem. > >> > > > > But port 0 has special meaning to the kernel (ie, "give me some random > > port"). Also, it is a reserved one. Please check IANA: > > > > http://www.iana.org/assignments/port-numbers > > > > I'm afraid you'll have to select another port number. > > > Nope. A source port of 0 is perfectly legal for UDP. > > I did an experiment with rpcbind whereby I performed a UDP based rpcinfo > query from one FreeBSD machine to another, captured the traffic, and > used tcpreplay to inject it from source port 0. > > At first I thought the INPCB hash lookup was doing the wrong thing, then > I ktrace'd rpcbind and it was apparent that it was in fact being > delivered to rpcbind from udp_input(). > > rpcbind tries to reply to destination port 0. This was verified with > kdump and rpcbind -d. This quite rightly fails, and, indeed, we reject > this from the socket code. > > So, FreeBSD appears to handle a UDP source port of 0 ok based on these > tests. > > The most likely explanation for the failure in this case, without > looking further, is that inetd or the tftpd implementations can't handle > source port 0. > > BMS > > > > > -- ******************************************************************* Don't ever forget to -*HUGME*- Yield to Temptation ... it may not pass your way again. -- Lazarus Long, "Time Enough for Love"