Commit Graph

2781 Commits

Author SHA1 Message Date
Roy Marples
f94b4eab06 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.
2015-01-31 01:02:07 +00:00
Roy Marples
505d71953c Bump copyright here as well. 2015-01-30 10:46:53 +00:00
Roy Marples
6824e7eceb Release dhcpcd-6.7.1 2015-01-30 10:05:47 +00:00
Roy Marples
799d2042f5 Fix compile with IPv6 disabled. 2015-01-30 10:05:21 +00:00
Roy Marples
fcf2387d5d Release dhcpcd-6.7.0 2015-01-30 09:23:21 +00:00
Roy Marples
182b3db0e8 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.
2015-01-23 11:00:17 +00:00
Roy Marples
16f1b54cd4 For Linux, keep the alias on the interface so we don't have to guess
all the time.
2015-01-22 20:10:18 +00:00
Roy Marples
29211f2503 Ignore RA's from ourself for very badly configured stations. 2015-01-21 21:02:39 +00:00
Roy Marples
2e59339983 Update to reflect 3.16 or older kernels and the header mismatch in ArchLinux on ARM. 2015-01-21 19:37:39 +00:00
Roy Marples
6635ae0d32 Fix warning on FreeBSD where we don't need to use sysctlbyname(3). 2015-01-20 20:56:13 +00:00
Roy Marples
515dd1616f 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.
2015-01-20 12:04:42 +00:00
Roy Marples
0e17602702 Ensure memory is freed when forking. 2015-01-20 11:41:46 +00:00
Roy Marples
ab84143db4 Add ipv6_freedrop, similar to dhcp6_freedrop so we can easily
drop and free or just free IPv6 temporary addresses.
2015-01-20 10:55:04 +00:00
Roy Marples
85bff6487d reject <option> will now reject any DHCP message that contains that option. 2015-01-20 10:42:47 +00:00
Roy Marples
4b18b8403c Restore IFA_F_MANAGETEMPADDR 2015-01-19 13:28:26 +00:00
Roy Marples
727cd92aaf 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.
2015-01-19 13:24:39 +00:00
Roy Marples
70193d0a9a Now that ipv6 has it's own eloop, ensure that we clear any interface
timeout when freeing the IPv6 state.
2015-01-18 20:46:43 +00:00
Roy Marples
7e16d38e99 Fix which interface to test ip6_use_tempaddr on when adding. 2015-01-18 20:34:57 +00:00
Roy Marples
a1f7b32cef 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.

Fixes [2ddfcb190f]
2015-01-17 02:29:54 +00:00
Roy Marples
c3d69056f1 Clarify the problem of identifying a bootp vs dhcp message. 2015-01-17 00:32:18 +00:00
Roy Marples
6091c732b0 Let packet filters name themselves to avoid confusion. 2015-01-16 23:39:03 +00:00
Roy Marples
31f26dd9b3 If we cannot open the kernel Packet Filter, give a better error message
and disable IPv4 configuration.
2015-01-16 23:11:39 +00:00
Roy Marples
72c02c013d Include paths.h to get _PATH_BPF. Thanks to Joerg Sonnenberger. 2015-01-16 23:01:29 +00:00
Roy Marples
c36a7aca23 time_t is not always unsigned. 2015-01-16 22:53:40 +00:00
Roy Marples
de67b95110 Only check DaD for addresses we have actually added ourselves. 2015-01-08 13:33:07 +00:00
Roy Marples
62f12387ac Add an option to disable the generation of autoconf addresses within a RA. 2015-01-08 13:31:42 +00:00
Roy Marples
7e651353d1 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. 2015-01-06 14:05:26 +00:00
Roy Marples
427b10c313 Warn about IPv6 kernel autoconf being disabled on BSD platforms. 2015-01-06 13:53:54 +00:00
Roy Marples
0fbdd88093 Fix another case where we could mistakenly claim ownership of IPv6 RA. 2015-01-06 13:42:51 +00:00
Roy Marples
f59c6f8596 Fix handling of ND6_IFF_OVERRIDE_RTADV on NetBSD. 2015-01-06 13:34:24 +00:00
Roy Marples
2179b718aa OpenBSD fixed their posix_spawn(3) implementation in 5.7 2015-01-05 14:12:23 +00:00
Roy Marples
f9584c9506 Update copyrights to 2015. 2015-01-02 20:03:28 +00:00
Roy Marples
adf84d84dd Welcome to 2015! 2015-01-01 20:50:48 +00:00
Roy Marples
4313d1e931 Only release the DHCPv6 lease when dropping it.
Fixes [bc15b90f7a]
2015-01-01 20:49:10 +00:00
Roy Marples
2360efb8cf Add qnx* to OS detection so we can pass the __EXT define and stay using
--cstd=c99.
2014-12-23 09:46:02 +00:00
Roy Marples
71b002d46e 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.
2014-12-23 09:40:14 +00:00
Roy Marples
ca867830ab Fix compile warnings without INET or INET6 using gcc. 2014-12-21 19:00:19 +00:00
Roy Marples
71d20c8a12 Fix compile on QNX. Thanks to Will Miles. 2014-12-20 14:11:38 +00:00
Roy Marples
7329549972 Guard against failure in if_discover. Thanks to Will Miles. 2014-12-20 14:09:26 +00:00
Roy Marples
8f9f46fc98 Use __restrict rather than restrict.
Thanks to Will Miles.
2014-12-20 12:15:07 +00:00
Roy Marples
84da000ec5 Attempt to define CMSG_SPACE for systems which lack it, like QNX. 2014-12-20 11:56:27 +00:00
Roy Marples
4131b3487c Release dhcpcd-6.6.7 2014-12-19 10:45:45 +00:00
Roy Marples
121e7ec9a2 Fix build without INET 2014-12-18 11:47:09 +00:00
Roy Marples
2d965ccde4 Don't set RA ownership in test mode. 2014-12-18 10:09:54 +00:00
Roy Marples
6d78eb2bde Release dhcpcd-6.6.6 2014-12-17 20:33:27 +00:00
Roy Marples
267c349620 Document some BSD systems lacking the ability to announce IPv6 address flag changes. 2014-12-16 22:12:16 +00:00
Roy Marples
0b3255ac87 Store acquired time for each IPv6 address so we can correctly offset
pltime and vltime if we need to re-add them.
2014-12-16 20:20:01 +00:00
Roy Marples
3852009b98 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.
2014-12-16 13:25:40 +00:00
Roy Marples
dffe72f6a6 The noalias directive will now remove any IPv4 addresses existing on
the interface when we want to add our own.
2014-12-13 13:35:18 +00:00
Roy Marples
f5761185f9 A server should not NAK an INFORM. 2014-12-12 21:52:16 +00:00