From owner-freebsd-net@FreeBSD.ORG Tue Jan 16 13:20:03 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 4D01216A407 for ; Tue, 16 Jan 2007 13:20:03 +0000 (UTC) (envelope-from rrs@cisco.com) Received: from sj-iport-4.cisco.com (sj-iport-4.cisco.com [171.68.10.86]) by mx1.freebsd.org (Postfix) with ESMTP id 1DAE613C442 for ; Tue, 16 Jan 2007 13:20:03 +0000 (UTC) (envelope-from rrs@cisco.com) Received: from sj-dkim-7.cisco.com ([171.68.10.88]) by sj-iport-4.cisco.com with ESMTP; 16 Jan 2007 05:16:41 -0800 Received: from sj-core-3.cisco.com (sj-core-3.cisco.com [171.68.223.137]) by sj-dkim-7.cisco.com (8.12.11/8.12.11) with ESMTP id l0GDGfrc013879; Tue, 16 Jan 2007 05:16:41 -0800 Received: from xbh-sjc-221.amer.cisco.com (xbh-sjc-221.cisco.com [128.107.191.63]) by sj-core-3.cisco.com (8.12.10/8.12.6) with ESMTP id l0GDGVho001524; Tue, 16 Jan 2007 05:16:39 -0800 (PST) Received: from xfe-sjc-211.amer.cisco.com ([171.70.151.174]) by xbh-sjc-221.amer.cisco.com with Microsoft SMTPSVC(6.0.3790.1830); Tue, 16 Jan 2007 05:16:30 -0800 Received: from [127.0.0.1] ([171.68.225.134]) by xfe-sjc-211.amer.cisco.com with Microsoft SMTPSVC(6.0.3790.1830); Tue, 16 Jan 2007 05:16:30 -0800 Message-ID: <45ACCFF4.4040709@cisco.com> Date: Tue, 16 Jan 2007 08:15:32 -0500 From: Randall Stewart User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.8) Gecko/20061029 FreeBSD/i386 SeaMonkey/1.0.6 MIME-Version: 1.0 To: "Bruce M. Simpson" References: <20070112163057.2a3ec8f0.rnsanchez@wait4.org> <45A807F8.7080603@FreeBSD.org> In-Reply-To: <45A807F8.7080603@FreeBSD.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 16 Jan 2007 13:16:30.0747 (UTC) FILETIME=[896386B0:01C73970] DKIM-Signature: v=0.5; a=rsa-sha256; q=dns/txt; l=2368; t=1168953401; x=1169817401; c=relaxed/simple; s=sjdkim7002; h=Content-Type:From:Subject:Content-Transfer-Encoding:MIME-Version; d=cisco.com; i=rrs@cisco.com; z=From:=20Randall=20Stewart=20 |Subject:=20Re=3A=20Problem=20with=20port=200 |Sender:=20; bh=NA78HZ8x8sYDW+3iiOwY+25JZ7CZPPDcyWR3TBX3JV0=; b=XbHPYAA4Uj2vAELYam6ewokYOHF2JK3lgjeRpy2jKpbMIo4/dqBFmasV3J88kMTtj+hu0v4g emgS3cE6GL9wnZiohpAwF5JloZdVAYg9Q/d3Pjhbq0XYfa+LKwntxJsf; Authentication-Results: sj-dkim-7; header.From=rrs@cisco.com; dkim=pass (sig from cisco.com/sjdkim7002 verified; ); Cc: freebsd-net@freebsd.org, Ricardo Nabinger Sanchez , hugme@hugme.org 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: Tue, 16 Jan 2007 13:20:03 -0000 So... I guess this really leads to a question.. What does "reserved" mean by IANA. I know in SCTP we defined that port 0 is NOT to be used (if I remember right)... but I am not sure what IANA has in mind for TCP or UDP. It is in the "lower range" of ports... and being reserved implies that no app should use it.. This looks like a good question for tsvwg or end2end .. I will pose it on tsv :-) R 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 > > > > > _______________________________________________ > freebsd-net@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-net > To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org" > -- Randall Stewart NSSTG - Cisco Systems Inc. 803-345-0369 803-317-4952 (cell)