Should Destination udp port be the source in the request or listen + 1?

Robert Pinter rfp at pinters.com
Mon Nov 15 17:51:18 UTC 2004


    While testing a new dhcp-3.0.2rc2, on a lab lan, I used the "-p" 
command line option to change the listen port to 6767.  I then 
recompiled the client to sent the bootp request on port 6767, but the 
client still listened on port 68.  I found that the server was not 
replying to the source port in the request but was sending the response 
to 6768.  I was able to work around the problem by changing the client 
listen port to 6868.  I find the code that makes this work this way in 
server/dhcpd.c line 412. 

My philosophical question is this: Shouldn't the dhcp response packet be 
sent back to the source port of the dhcp request, not fixed to one more 
then the listen port?

This would require modifications to the source wherever the 
"remote_port" variable is currently used.

Robert Pinter <rfp at pinters.com>
GPG 1024D/ABB41120: 1B47 0BF3 E7DE 8694 097C E69D A752 1090 ABB4 1120


More information about the dhcp-hackers mailing list