Date: Tue, 16 Jan 2007 14:00:15 -0800 From: Bill Fenner <fenner@research.att.com> To: Randall Stewart <rrs@cisco.com> Cc: freebsd-net@freebsd.org, "Bruce M. Simpson" <bms@freebsd.org>, Ricardo Nabinger Sanchez <rnsanchez@wait4.org>, hugme@hugme.org Subject: Re: Problem with port 0 Message-ID: <200701162200.l0GM0FkG011595@bright.research.att.com> References: <f9876c510701120903r65543ef4nafc7eeead2becb42@mail.gmail.com> <20070112163057.2a3ec8f0.rnsanchez@wait4.org> <45A807F8.7080603@FreeBSD.org> <45ACCFF4.4040709@cisco.com>
index | next in thread | previous in thread | raw e-mail
I'd note that RFC 768 explicitly mentions this possibility:
Source Port is an optional field, when meaningful, it indicates the port
of the sending process, and may be assumed to be the port to which a
reply should be addressed in the absence of any other information. If
not used, a value of zero is inserted.
I think Hug is saying that since the boot loader is the only thing that's
running on the box, it's got no reason to use a port number, so it's
not used.
Hug's error message:
>with default tftp - Jan 12 09:37:55 dukeengi01 tftpd[80898]: connect: Can't
>assign requested address
is consistent with the following code from in_pcbconnect_setup():
if (sin->sin_port == 0)
return (EADDRNOTAVAIL);
which dates back to BSD 4.4 and before.
This is probably not completely wrong, but it's not right in this particular
case - tftpd should be able to connect a UDP socket to a remote port 0 in
order to respond to this request.
(FreeBSD definitely can't send from port 0, but that's OK because we don't
want to.)
Bill
home |
help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200701162200.l0GM0FkG011595>
