Skip to contentSkip to conversation

Sending UDP packets to port 0

DISCUSSION Christian P. Schmidt 2 participants 2 messages Jun 22, 2008

lore
Share & tools
lore
#0 lore raw

Hi all,

I know that the kernel forbids sending UDP packets to port 0. Is there a specific reason for this?

I'm asking because I regularly need to access a device that asks for tftp files using port 0 as source. To use these devices I'm using a kernel with removed port 0 checks.

I read RFC 768, and it does not explicitly forbid the use of port 0 as far as I can see. It only says that if unused, 0 is to be inserted.

RFC 1350 (TFTP) even states explicitly:
The transfer identifiers (TID's) used by TFTP are passed to the Datagram layer to be used as ports; therefore they must be between 0 and 65,535.

In my understanding, and apparently that of the authors of the appliance's tftp client implementation, this marks port 0 as valid.

Please CC: me on any replies as I am not subscribed to the list.

Regards,
Chris

#1 lore raw
Quoted 4 lines · Christian P. Schmidt

RFC 1350 (TFTP) even states explicitly:
The transfer identifiers (TID's) used by TFTP are passed to the Datagram layer to be used as ports; therefore they must be between 0 and 65,535.

One could interpret "between" as 0 > x < 65535 and not 0 >= x <= 65535 (that could be "between (inclusive)").