- changed status to resolved
DHCP siaddr sometimes set to loopback
Issue #1
resolved
Using tftpd64 as a DHCP and TFTP server, I found that sometimes the siaddr it sent was 127.0.0.1, causing the client to then use that as the TFTP server address, which failed. Apparently sometimes the IP address of the interface the DHCP request was received on was not found by FindNearestServerAddress(), perhaps because the interface is a USB Ethernet/RNDIS Gadget that came up moments before the request was received.
The attached patch fixed the problem for me: when FindNearestServerAddress() doesn't find a match to the client IP address, instead of just using loopback or a random IP address from the server, the siaddr will instead be set to the address of the interface that received the request.
Comments (1)
-
repo owner - Log in to comment
Thanks, for your bug report and its workaround. Your patch has been included in release 4.61