if_address6 works.
Use a pointer to the ipv4_addr for the address we added for dhcp and ipv4ll
states.
This is quite some churn throughout the IPv4 stack, but makes the
binary smaller (at least on Linux/amd64).
It will be needed to support adding addresses on Solaris.
This is unicast, whereas the default kernel action is to unicast a stock
reply, so the client that tried to claim the address will receive two replies.
Fixes [a19bb0eae6].
and dhcp.c
Split configure.c into script.c and move the rest into dhcp.c
This starts the goal of making the base of dhcpcd protocol agnostic and
working towards building IPv4 and/or IPv6 code only to reduce size and
allow growing any future new protocol easier.
Split client.c into smaller files and functions and
recode around the event loop.
Add multiple interface support using the new event loop.
Document changes and outstanding bugs.
The code has been drastically re-arranged.
Instead of populating a custom structure while parsing dhcp messages, we now pluck what we need right out of the message itself. We have custom functions and a lookup table to make this really easy.
This makes us more like dhclient and udhcpc, and will enable us to easily add (and remove!) more dhcp options without having to actually change the code (much).
We now store the real dhcp message we got in /var/db/dhcpcd-$iface.lease, the mtime of the file being used as when we got the lease. This file is read in when re-using an old lease instead of parsing the .info file.
The benefit of all of this means that we're actually ~15k smaller when compiled with the same features.
This has been tested for quite some time, and I'm pretty sure most bugs with the 3.2 branch have been fixed whilst making this. Right now, we are 99% command line compatible with the 3.2 branch.
intervals like we do otherwise.
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.