The odd DHCP server sets the OPT_HOSTNAME option in its
replies to its own hostname. This is _wrong_.
OPT_HOSTNAME is supposed to be the _clients_ hostname.
Also, the OPT_HOSTNAME option was sent twice, once
unconditionally and once more if requested by the
client. I'm assuming the intention was that the server
should always send its own hostname (but with another
option than OPT_HOSTNAME) and the clients hostname only
when requested (since this makes sense).
Therefore, this patch does the following:
* In dhcp_store_option_arr, set the OPT_HOSTNAME option
to the _clients_ hostname, since that's what was requested.
* For the unconditional options in
dhcp_handle_DHCPDISCOVER and dhcp_handle_DHCPREQUEST,
use the servers hostname, but use a different option
code. I wasn't able to find a suitable option code in
the RFC though, so I set it to "OPT_???" and commented
out the lines for the time being.
Patch to nodes/odd/src/odd/dhcp.c fixing the OPT_HOSTNAME abuse.