On Tuesday 05 January 2010 14:43:49 you wrote:
Say the DHCP server is running in client mode. It has also been requested to broadcast its replies, not unicast the replies.
http://blogs.technet.com/teamdhcp/archive/2009/02/12/dhcp-broadcast-flag-ha ndling-in-windows-7.aspx
If i'm reading this code correctly, it will end up sending the DHCP reply messages by unicast to the best gateway, not the DHCP client?
I don't really get your question. The batman-adv gwclient will encapsulate the DHCP discover / request packets in ethernet unicast headers instead of broadcast headers to make sure only the best gateway receives these broadcasts. The server's replies won't be affected at all.
Ah, just read the RFC. I though the client was free to choose its port, so it could choose port 67. If that was true, gw_is_target() would return true for the reply and the reply would then be sent to the gateway.
However, the RFC says the client must use port 68, so this can never happen. So there is no problem here...
Andrew