Re-license as 2-clause BSD as I've re-written everything
from the old dhcpcd-2 code base now.
Work with the BSD RC system too.
Find resolvconf in path instead of /sbin.
make HAVE_FORK=yes|no should be used if cross compiling.
Implement an exponential NAK backoff.
Clear the signal_pipe fd from the fdset when all signals have
been read.
Don't release a link local address.
Use sysconf to detect if we have a working monotonic clock.
Only request NTP, NIS, etc if we have compiled that feature in.
dhcpcd --version now shows what compile time options were used.

dhcpcd-3.1.7
Add warnings about requesting a link local address.
Always add a link local route unless we're given a non-private
address by the DHCP server.
Reduce stack usage by using malloc more.
If we're on a different subnet from the one we get DHCP for, don't
use our current address in messages. Thanks to Wilson Callan.
Skip over bogus EINTR error on select when arp checking for a
different address from what we already have.

dhcpcd-3.1.6
--skiproutes has been added for no fork users so that we know if we
can delete the route at a later date.
Many thanks to Michael Durrant for testing the below changes.
Compile and work on OSX/Darwin.
If we have no fork then we re-exec ourselves with --daemonised.
Improved the build system so we automatically detect if we need
librt or libresolv and if fork() works or not.
Move back to using librt for clock_gettime on Linux systems.

dhcpcd-3.1.5
Fix the flushing of addresses on BSD systems.
Rework get_time so that we don't link to librt on Linux.
Thanks to regenrecht for reporting the below three overflows:-
 Fix a potential buffer overflow in hwaddr_ntoa if length > 42.
 Fix a potential heap overflow in decode_CSR when CIDR > 32.
 Fix a potential heap overflow in decode_sipservers when length is 1.
-L actually doesn't do IPv4LL as advertised.

dhcpcd-3.1.4
Ensure ARP checking times out when there is a flood.
Add -x option to quit without releasing the lease.

dhcpcd-3.1.3
Fix link routes which broke in 3.1.2.

dhcpcd-3.1.2
Use a generic route logger.
Fix static route netmask calculation and applicaton.
Use --nodeps when restarting services.
Simply CIDR calculation, thanks to Francois-Xavier Le Bail.
Don't free the dhcp object on RENEW (fixes a segfault).

dhcpcd-3.1.1
Fix segfault in arp code that some users had.
Remove getifaddrs code and instead just use ioctls so we don't break
platforms without getifaddrs as often.

dhcpcd-3.1.0
Add new socket code to try and support InfiniBand better.
Support RFC 3361 SIP Servers.
We now do ARP checking by default as recommended by RFC 2131.
Add RFC 3927 (aka IPV4LL aka APIPA) support by default.
Suport DHCP option (52) overload.
Added -T test option. This just sends a DHCP_DISCOVER message and then
prints the configuration data to stdout - we don't request a lease,
configure the interface or write the info file.
Fix adding of routes on the BSDs.
ROOTPATH should work correctly again, thanks to danhien.
We now have 6 hostname options, which should satisfy everyone.
Fix arp compilation warning on GCC-4.2.0.
Enable DHCP_INFORM support via the -s option again, moving DHCP_REQUEST
to the -r option. This makes us more compatible with dhcpcd-1.x and 2.x.
Ensure that dhcpcd.sh is always called.
flock the pidfile and stop writing the parent pid to it so we're more robst.
Use the DUID stored to create an RFC 4361 conformant client identifier
if none is specified instead of just using the MAC address.
Create a DUID-LLT according to RFC 3315 and store it in peristent file.
config.h now has the compile time options, instead of being dotted around.
Added -E option, which reads the last info file and uses the information there
if we timeout and the lease is still valid, thanks to Roberto Angelino.
Compiles ok on NetBSD thanks to Gabor Z. Papp.
If the current hostname contains dots then send it as a FQDN.
Ensure that static routes are always added before routers.
Use getnameinfo instead of gethostbyaddr.
Remove gateways from the ROUTES and add to GATEWAYS
define #INFO_COMPAT if you wish your .info file to add support for some
old 1.x and 2.x structure.

dhcpcd-3.0.17
Minimum message size is now 300 bytes for crappy DHCP servers who think
they have to obey the BOOTP minimum message size :/
Compile ok on OpenBSD (thanks to icezimm and reb in #gentoo-bsd for testing)
We check gcc supports -Wextra and friends before using them.
We now restore the starting MTU value when we exit OR we don't receive a
a valid MTU value from the dhcp server.
--nomtu / -M now stops the MTU from being used.
You can now build dhcpcd without support for writing ntp, nis and info files
which makes the binary a few k smaller.
Support OpenNTP as well as NTP.
Re-work the state engine a little, so we renew and rebind correctly.
Subsequent debug options stop dhcpcd from daemonising.
When we get an invalid length for a DHCP option, try and continue anyway.
When MTU is less than 576 we now ignore it instead of setting the MTU to 576.
Build correctly on dietlibc, thanks to d00mer.
Check that if_nametoindex returns a valid index, thanks to d00mer.

dhcpcd-3.0.16
RFC 2131 is full of confusion regarding MTU it seems as the effective minimum
MTU is really 576 or DHCP requests stop working.

dhcpcd-3.0.15
Fix MTU length checking.
We now request MTU from the DHCP server, and if given we set it.

dhcpcd-3.0.14
Don't crash with 0 or invalid length DHCP options, reported by
Stefan de Konink.

dhcpcd-3.0.13
Fix regression on Linux for sending packets over non Ethernet devices.
define ARPHRD_IEEE1394 if it doesn not exist, like for Linux-2.4 kernels.

dhcpcd-3.0.12
Test to see if the pid in the pidfile is actually running before claiming
that we are.
Fix the `netlink message truncated` error since 3.0.6.
We now ensure that our renewal and rebind times are sane.
Fix flushing interfaces for systems without getifaddrs and >1 interface.
All netlink error messages are now prefixed with netlink.
Add DHCP over FireWire 1394 (RFC 2855) and InfiniBand (RFC 4390) support.
We should add support for DUIDs (RFC 4361) as well.

dhcpcd-3.0.11
Don't try to send messages when we infinite leasetime and the interface
fd is closed.

dhcpcd-3.0.10
Only write a new ntp.conf if any of our servers are not present in it.
We now work with SIGCHLD and call wait so that we don't leave any
zombies lying around.
For infinite timeout, we now resent the last request at +TIMEOUT_MINI
intervals until TIMEOUT_MINI_INF is reached, thanks to siadak.
We now return a non zero exit code on SIGTERM and SIGINT if we have not
forked into the background.
When NIS and/or NTP servers are updated, we restart the service for them
if we can.

dhcpcd-3.0.9
Add static routes before any default routes as a router may require a host
route in the static routes.

dhcpcd-3.0.8
Fix arp checking.
linux header asm/types.h doesn't work with c99 which is just wrong,
so it's back to gnu99 until a working linux version is released.

dhcpcd-3.0.7
Allow Linux to use Token Ring again as Linux does not have any more hardware
specific code. BPF needs a patch for Token Ring support.
Dawin is now reported to work. NetBSD and OpenBSD should work also.
cleanmetas now inserts a \ when it finds a ' so we get the proper
values in our .info files when read by a shell.
Add new CFLAGS to ensure that the code quality is good.
Use const more in public functions.

dhcpcd-3.0.6
Don't set the broadcast flag anymore as all BPF and Linux sockets should be
able to unicast correctly.

dhcpcd-3.0.5
Fix yp.conf creation.

dhcpcd-3.0.4
Fix netmask thanks to Marc Duponcheel.
Send the hostname by default unless null, (none) or localhost.
This can be overridden by using a an empty option for -h (-h '').

dhcpcd-3.0.3
NIS setup (yp.conf / domainname) works again.
Send hostname/fqdn in DISCOVER and INFORM messages too.
Add more debug messages.
Fix writing to resolv.conf when resolvconf not present.
Include linux/if_addr.h for 2.6.19+ kernels, thanks to AlexExtreme.

dhcpcd-3.0.2
Linux systems without glibc-2.3 don't have getifaddrs, so we define our own.
Changed the default timeout to 20 seconds, allowing hme Sparc drivers to work.
Set the rfds correctly so we can get a reply after re-sending a request.
Set the seconds elasped and maximum message size correctly in DHCP messages.
Now compiles on Linux 2.4 kernels. 
xmalloc dhcp objects so we can swap the pointers around easily.

dhcpcd-3.0.1
Quote all vars in the info file.
-n and -G options now work as stated in the man page.
Handle select loops with large timeouts and infinite lease times.
Correctly set the broadcast flag.
make_dhcp_packet already has byte ordered addresses, thanks to TGL
for the fix.
If we get a NAK then always re-enter the INIT state.

dhcpcd-3.0.0
A complete rewrite by Roy Marples <uberlord@gentoo.org>

Functional changes since version 2:
We now support FreeBSD as well as Linux.
RFC 3004 User Class support has been added.
RFC 3442 Classless Static Routes support has been added
(thanks to apexman for helping).
Options -r, -e, -v, -w, -B, -C, -D, -L, -S have been dropped.
-a now means "do arp" instead of "don't arp".
-o has been dropped, but we never bring down the interface anymore.
IP address is now required for the -s option.
-G no longer takes an IP address as an replacement gateway.
The .cache file is no longer created or used.
Default script is now /etc/dhcpcd.sh instead of /etc/dhcpc/dhcpcd.exe.
The .info file has changed slightly to better support mulitple entries with
more than one entity, such as route now having network,genmask and gateway.
We no longer create and restore .sv files as it's up to the interface
manager to restore them correctly as >1 dhcp client may be running.

For ChangeLog for prior versions can be found in their tarballs.
