From owner-freebsd-net@FreeBSD.ORG Fri Jan 12 23:35:34 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 A5AAF16A416; Fri, 12 Jan 2007 23:35:34 +0000 (UTC) (envelope-from cswiger@mac.com) Received: from mail-out4.apple.com (mail-out4.apple.com [17.254.13.23]) by mx1.freebsd.org (Postfix) with ESMTP id 8AAA313C428; Fri, 12 Jan 2007 23:35:34 +0000 (UTC) (envelope-from cswiger@mac.com) Received: from relay5.apple.com (a17-128-113-35.apple.com [17.128.113.35]) by mail-out4.apple.com (8.13.8/8.13.8) with ESMTP id l0CMnNiW010471; Fri, 12 Jan 2007 14:49:23 -0800 (PST) Received: from relay5.apple.com (unknown [127.0.0.1]) by relay5.apple.com (Symantec Mail Security) with ESMTP id 1AA3529C003; Fri, 12 Jan 2007 14:49:23 -0800 (PST) X-AuditID: 11807123-a435cbb0000039f2-f0-45a81072b006 Received: from [17.214.13.96] (unknown [17.214.13.96]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by relay5.apple.com (Apple SCV relay) with ESMTP id ED6C930400C; Fri, 12 Jan 2007 14:49:22 -0800 (PST) In-Reply-To: <45A807F8.7080603@FreeBSD.org> References: <20070112163057.2a3ec8f0.rnsanchez@wait4.org> <45A807F8.7080603@FreeBSD.org> Mime-Version: 1.0 (Apple Message framework v752.2) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: <9A4F1DBC-B536-4845-811B-8546E4201D69@mac.com> Content-Transfer-Encoding: 7bit From: Chuck Swiger Date: Fri, 12 Jan 2007 14:49:22 -0800 To: "Bruce M. Simpson" X-Mailer: Apple Mail (2.752.2) X-Brightmail-Tracker: AAAAAA== Cc: freebsd-net , 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: Fri, 12 Jan 2007 23:35:34 -0000 On Jan 12, 2007, at 2:13 PM, Bruce M. Simpson wrote: > Ricardo Nabinger Sanchez wrote: >> 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. There's nothing in RFC-768 which forbids one from using a source or destination port of 0, but it also is true that IANA reserves 0/tcp and 0/udp for exactly the reasons Ricardo mentioned. I know that at least some firewalls will explicitly drop traffic using port 0 because it is expected that a well-behaved network stack will reassign a random ephemeral port rather than sending traffic out to or from port 0...YMMV. -- -Chuck