interface index. If the biggest SLA and the assigned prefix fits into a /64
then dhcpcd creates a /64 prefix so that SLAAC works. If bigger than /64
is needed then dhcpcd creates one rounded upto the nearest multiple of 8.
Unless a configured SLA of 0 is assigned, a reject route for the Delegated
Prefix is installed to stop unassigned addresses trying to be resolved upstream.
Addresses added from Delegated Prefixes now have a default address suffix of 1
instead of using a SLAAC style address.
This fixes RTM address handling on FreeBSD and OpenBSD.
Instead of listening for duplicate address messages for
FreeBSD and OpenBSD simply poll for the address flag changing.
This means less code to maintain and hopefully less error-prone.
Remove dead code which send a DAD as this is, and should,
be done entirely in the kernel.
However, there is a problem deleting both IPv4 and IPv6 subnet routes.
Also, there is a problem opening a BPF fd in non blocking mode directly and
posix_spawn(3) fails to work so we block that in configure.
of hex based arrays.
The SLA can now be applied to any router given prefix length provided the
SLA can fit into the prefix and desired prefix length.
We now wait for a carrier and LL address before adding the addresses from the
delegated prefix. Before adding this code, I added some code to generate a
LL address from the hardware address. This is now #ifdef'ed out as I don't
want to throw it away in-case dhcpcd ever needs to create LL addresses
itself.
Many thanks to Martin Husemann who developed code for these functions:
ipv6_userprefix, in6_to_h64 and h64_to_in6
which are used to generate a prefix from the delegated prefix and the SLA
Only add delegated addresses once for each delegation.
When the kernel expires them we will see this via RTM_DELADDR and
remove the address from our list and thus the route.
Add pfx_flush to flush ND6 entries when changing routes.
Both these functions only work for BSD, just stubs on Linux.
This tidies the code a little and fixes changing IPv6 routes on BSD,
although the kernel may complain network is down for a few moments.
Listen to kernel messages to account them.
If we don't have a local link address, delay IPv6RS as it just
won#t work until we have a local link address.
RTM_NEWADDR for duplicates, or directly on the wire with a maximum
timeout.
Warn about this noisily as there is no reason why the kernel cannot be
easily patched to support this.
Handle the actual trigger to callout dhcpcd-run-hooks in the DAD callback
instead of on receipt of RTM_NEWADDR directly. This is more code, but it allows
us to use our own DAD engine if we need to.
Sadly, it seems that userland cannot send from the unspecified address.
This means that for RFC conformancy, we have to rely on the kernel
performing DAD.
instead of the kernel. dhcpcd will only do this if RA is disabled in the kernel
or dhcpcd has been instructed to do this via dhcpcd.conf(5) ipv6ra_own and
ipv6ra_own_default directives.
Send and process IPv6 Neighbor Solicitions and Adverts to prove router
reachability. If a router cannot be reached in this way then it is expired.
When debugging, all ND messages are displayed which will create a lot of log
spam.
To ease packaging, ./configure now accepts LDFLAGS and --enable-static.