Roy Marples [Fri, 27 Feb 2015 14:33:09 +0000 (14:33 +0000)]
If RTF_CLONING is supported, create a cloning network route to the host instead
of a host route.
This avoids the kernel printing ARP diagnositic messages.
Roy Marples [Thu, 26 Feb 2015 13:22:41 +0000 (13:22 +0000)]
After adding an address load the kernel routing table for the interface.
When routes are rebuilt try not to remove any existing routes if they
don't need changing.
Roy Marples [Fri, 20 Feb 2015 08:28:04 +0000 (08:28 +0000)]
Move the pidfile into the dhcpcd context.
When dumping a lease by filename, store the filename in the pidfile.
Fixes an issue where the filename overflows the interface name size.
Roy Marples [Sat, 31 Jan 2015 01:02:07 +0000 (01:02 +0000)]
Use strtoi(3) and strtou(3) from NetBSD-8 instead of the harder to use
strtol(3) calls.
Add shims around strtoimax(3) and strtoumax(3) when these functions
are not available.
Roy Marples [Fri, 23 Jan 2015 11:00:17 +0000 (11:00 +0000)]
Only extend temporary addresses with pltime.
If the Prefix Information Option has zero pltime, set all temporary addresses
with a pltime to zero for the prefix.
Roy Marples [Tue, 20 Jan 2015 12:04:42 +0000 (12:04 +0000)]
Revert part of the prior patch and only free IPv6 if state when
freeing and not dropping so we retain IPv6 addresses we don't
generally control on carrier down.
Roy Marples [Mon, 19 Jan 2015 13:24:39 +0000 (13:24 +0000)]
Change define KERNEL_MANAGETEMPADD to IPV6_MANAGETEMPADDR.
Use this to block out actual address additions so we don't get bogus errors
about not being able to create temporary addresses.
Roy Marples [Sat, 17 Jan 2015 02:29:54 +0000 (02:29 +0000)]
Implement RFC4941, Privacy Extensions for Stateless Address Autoconfiguration
in IPv6 when dhcpcd is overriding the in-kernel RA support.
For Linux kernels (3.18+) which support IFA_F_MANAGETEMPADDR the bulk of
this changeset is compiled out and the kernel will manage the temporary
addresses entirely.
For BSD, this is a fully compliant implementation with the caveat
that when dhcpcd is restarted the last non deprecated temp address on the
interface will be treated as being created when it was last updated
rather when it was actually added. Thus this may voilate section 3.3.
As dhcpcd won't restart in normal operation, this isn't an issue.
For Linux (3.18+) which supports IFA_F_MANAGETEMPADDR, the bulk of this
changeset is compiled out as the kernel will manage the temporary addresses.
For older Linux this is a fully compliant implementation with the caveat that
when restarted new temporary addresses will be generated.
Roy Marples [Tue, 6 Jan 2015 14:05:26 +0000 (14:05 +0000)]
IPv6 kernel autoconf disabled is not an error condition to stop IPv6 from working if not owning the RA process and DHCPv6 is present in an RA message, but we should still warn about it never the less.
Roy Marples [Tue, 23 Dec 2014 09:40:14 +0000 (09:40 +0000)]
undef CMSG_SPACE and use our own define for platforms where CMSG_SPACE does
not evaluate to a compile time constant, such as QNX.
Thanks to Will Miles.
Roy Marples [Tue, 16 Dec 2014 13:25:40 +0000 (13:25 +0000)]
For BSD systems stop polling for IPv6 router reachability.
This didn't work on all BSD platforms and where it did work,
it didn't work reliably.
Instead, expect for cached neighour route additions/changes/removals to be
announced by the kernel.
Currently only NetBSD-7.99.3 supports this so this is added to the README.
Roy Marples [Wed, 26 Nov 2014 12:08:32 +0000 (12:08 +0000)]
If a DHCP lease has expired on reboot, don't expire it right away as that
might violate POLA. It will either be removed or renewed depending on the
DHCP server regardless.