DHCP siaddr sometimes set to loopback

Issue #1 new
Philip Taff
created an issue

Using tftpd64 as a DHCP and TFTP server, I found that sometimes the siaddr it sent was, 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 (0)

  1. Log in to comment