Logging DHCP messages sent or received with priority DBG made it hard
to see what was happening. So log them at priority WARN, but also make
them less verbose at that level since seeing the whole message is not
too useful most of the time.
The "min_timeout" variable maintained by the DHCP client is measured
in seconds from the time the state was entered, but dhclient_wait()
was interpreting it as seconds from now. This made the DHCP client wait
much longer than necessary in some cases.
The upcoming ofp-discover program wants to print out the binding
information, and dhcp_msg_to_string() is pretty close to what it
wants. But one-field-per-line is easier for other programs to parse.
This allows us to have DHCP clients that don't actually bind or unbind
a network device's IP address. This is useful for doing controller
discovery without actually reconfiguring a network device.
There's no need to set changed unconditionally in dhclient_init(), and
it can make extra work for the users of the dhclient, by causing them
to think that something changed when it didn't.
We can't guarantee uniqueness of ip_id versus the host's, screwing up
fragment reassembly, so prevent fragmentation and use an all-zeros
ip_id. RFC 791 doesn't say we can do this, but Linux does the same
thing for DF packets, so it must not screw anything up.