]> git.ipfire.org Git - thirdparty/dhcpcd.git/log
thirdparty/dhcpcd.git
11 years agoRemove the address from the eloop tiemout queue before freeing.
Roy Marples [Fri, 27 Feb 2015 19:53:03 +0000 (19:53 +0000)] 
Remove the address from the eloop tiemout queue before freeing.

11 years agoUse strlcpy
Roy Marples [Fri, 27 Feb 2015 19:52:00 +0000 (19:52 +0000)] 
Use strlcpy

11 years agoOnly warn about adding a host route to the router the once.
Roy Marples [Fri, 27 Feb 2015 14:58:13 +0000 (14:58 +0000)] 
Only warn about adding a host route to the router the once.

11 years agoIf RTF_CLONING is supported, create a cloning network route to the host instead
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.

11 years agoStop using link_addr(3).
Roy Marples [Fri, 27 Feb 2015 14:21:01 +0000 (14:21 +0000)] 
Stop using link_addr(3).
Instead just set the sdl_index to specify which interface the route is for.

11 years agoAfter adding an address load the kernel routing table for the interface.
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.

11 years agoTypo
Roy Marples [Mon, 23 Feb 2015 17:47:25 +0000 (17:47 +0000)] 
Typo

11 years agoAllow snapshots to be built.
Roy Marples [Mon, 23 Feb 2015 12:16:17 +0000 (12:16 +0000)] 
Allow snapshots to be built.

11 years agoOpenBSD has automatic loopback routes
Roy Marples [Mon, 23 Feb 2015 12:05:34 +0000 (12:05 +0000)] 
OpenBSD has automatic loopback routes

11 years agoSupport BSDs where userland is not allowed to set temporary addresses.
Roy Marples [Mon, 23 Feb 2015 10:55:09 +0000 (10:55 +0000)] 
Support BSDs where userland is not allowed to set temporary addresses.

11 years agologger(1) from util-linux-2.26 now has an option argument to -i, so work
Roy Marples [Mon, 23 Feb 2015 09:35:42 +0000 (09:35 +0000)] 
logger(1) from util-linux-2.26 now has an option argument to -i, so work
with this as well.
Fixes [eb1ef6a62b].

11 years agoMove the pidfile into the dhcpcd context.
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.

11 years agoUse the exit code of EXIT_SUCCESS when terminating gracefully.
Roy Marples [Wed, 18 Feb 2015 20:29:42 +0000 (20:29 +0000)] 
Use the exit code of EXIT_SUCCESS when terminating gracefully.

11 years agoipi6.ifiindex differes between OS's so have a cast function
Roy Marples [Wed, 18 Feb 2015 20:09:57 +0000 (20:09 +0000)] 
ipi6.ifiindex differes between OS's so have a cast function

11 years agoCheck IPv6 state before regenerating random seeds. Fixes [eb1ef6a62b].
Roy Marples [Wed, 18 Feb 2015 16:52:49 +0000 (16:52 +0000)] 
Check IPv6 state before regenerating random seeds. Fixes [eb1ef6a62b].

11 years agoNo need to check this again.
Roy Marples [Wed, 18 Feb 2015 16:43:54 +0000 (16:43 +0000)] 
No need to check this again.

11 years agoTidy definitions
Roy Marples [Wed, 18 Feb 2015 13:40:40 +0000 (13:40 +0000)] 
Tidy definitions

11 years agoFix compile on some systems.
Roy Marples [Wed, 18 Feb 2015 13:40:23 +0000 (13:40 +0000)] 
Fix compile on some systems.

11 years agoFix test, thanks to Olaf Westrik.
Roy Marples [Fri, 13 Feb 2015 12:22:05 +0000 (12:22 +0000)] 
Fix test, thanks to Olaf Westrik.

11 years agoTest if we fake loaded a lease so we can report the correct state.
Roy Marples [Fri, 13 Feb 2015 11:28:17 +0000 (11:28 +0000)] 
Test if we fake loaded a lease so we can report the correct state.

11 years agoReserve space for a fully escaped SSID in the lease filename.
Roy Marples [Tue, 10 Feb 2015 08:54:33 +0000 (08:54 +0000)] 
Reserve space for a fully escaped SSID in the lease filename.

11 years agoSpaces in filenames suck hard.
Roy Marples [Tue, 10 Feb 2015 08:50:39 +0000 (08:50 +0000)] 
Spaces in filenames suck hard.

11 years agoDisallow / in the SSID when using in a lease filename.
Roy Marples [Mon, 9 Feb 2015 17:32:34 +0000 (17:32 +0000)] 
Disallow / in the SSID when using in a lease filename.

11 years agoStore lease files per interface per ssid.
Roy Marples [Mon, 9 Feb 2015 15:35:49 +0000 (15:35 +0000)] 
Store lease files per interface per ssid.

11 years agoAdjust comment to remove +x bit.
Roy Marples [Sun, 8 Feb 2015 13:24:14 +0000 (13:24 +0000)] 
Adjust comment to remove +x bit.

11 years agoFix Linux define.
Roy Marples [Sun, 8 Feb 2015 12:57:38 +0000 (12:57 +0000)] 
Fix Linux define.

11 years agoFix comment
Roy Marples [Tue, 3 Feb 2015 09:37:21 +0000 (09:37 +0000)] 
Fix comment

11 years agoTest mode removes the daemonise bit, so check for both when setting the timeout.
Roy Marples [Tue, 3 Feb 2015 09:00:36 +0000 (09:00 +0000)] 
Test mode removes the daemonise bit, so check for both when setting the timeout.

11 years agoFix cast
Roy Marples [Sat, 31 Jan 2015 01:03:24 +0000 (01:03 +0000)] 
Fix cast

11 years agoUse strtoi(3) and strtou(3) from NetBSD-8 instead of the harder to use
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.

11 years agoBump copyright here as well.
Roy Marples [Fri, 30 Jan 2015 10:46:53 +0000 (10:46 +0000)] 
Bump copyright here as well.

11 years agoRelease dhcpcd-6.7.1 v6.7.1
Roy Marples [Fri, 30 Jan 2015 10:05:47 +0000 (10:05 +0000)] 
Release dhcpcd-6.7.1

11 years agoFix compile with IPv6 disabled.
Roy Marples [Fri, 30 Jan 2015 10:05:21 +0000 (10:05 +0000)] 
Fix compile with IPv6 disabled.

11 years agoRelease dhcpcd-6.7.0 v6.7.0
Roy Marples [Fri, 30 Jan 2015 09:23:21 +0000 (09:23 +0000)] 
Release dhcpcd-6.7.0

11 years agoOnly extend temporary addresses with pltime.
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.

11 years agoFor Linux, keep the alias on the interface so we don't have to guess
Roy Marples [Thu, 22 Jan 2015 20:10:18 +0000 (20:10 +0000)] 
For Linux, keep the alias on the interface so we don't have to guess
all the time.

11 years agoIgnore RA's from ourself for very badly configured stations.
Roy Marples [Wed, 21 Jan 2015 21:02:39 +0000 (21:02 +0000)] 
Ignore RA's from ourself for very badly configured stations.

11 years agoUpdate to reflect 3.16 or older kernels and the header mismatch in ArchLinux on ARM.
Roy Marples [Wed, 21 Jan 2015 19:37:39 +0000 (19:37 +0000)] 
Update to reflect 3.16 or older kernels and the header mismatch in ArchLinux on ARM.

11 years agoFix warning on FreeBSD where we don't need to use sysctlbyname(3).
Roy Marples [Tue, 20 Jan 2015 20:56:13 +0000 (20:56 +0000)] 
Fix warning on FreeBSD where we don't need to use sysctlbyname(3).

11 years agoRevert part of the prior patch and only free IPv6 if state when
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.

11 years agoEnsure memory is freed when forking.
Roy Marples [Tue, 20 Jan 2015 11:41:46 +0000 (11:41 +0000)] 
Ensure memory is freed when forking.

11 years agoAdd ipv6_freedrop, similar to dhcp6_freedrop so we can easily
Roy Marples [Tue, 20 Jan 2015 10:55:04 +0000 (10:55 +0000)] 
Add ipv6_freedrop, similar to dhcp6_freedrop so we can easily
drop and free or just free IPv6 temporary addresses.

11 years agoreject <option> will now reject any DHCP message that contains that option.
Roy Marples [Tue, 20 Jan 2015 10:42:47 +0000 (10:42 +0000)] 
reject <option> will now reject any DHCP message that contains that option.

11 years agoRestore IFA_F_MANAGETEMPADDR
Roy Marples [Mon, 19 Jan 2015 13:28:26 +0000 (13:28 +0000)] 
Restore IFA_F_MANAGETEMPADDR

11 years agoChange define KERNEL_MANAGETEMPADD to IPV6_MANAGETEMPADDR.
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.

11 years agoNow that ipv6 has it's own eloop, ensure that we clear any interface
Roy Marples [Sun, 18 Jan 2015 20:46:43 +0000 (20:46 +0000)] 
Now that ipv6 has it's own eloop, ensure that we clear any interface
timeout when freeing the IPv6 state.

11 years agoFix which interface to test ip6_use_tempaddr on when adding.
Roy Marples [Sun, 18 Jan 2015 20:34:57 +0000 (20:34 +0000)] 
Fix which interface to test ip6_use_tempaddr on when adding.

11 years agoImplement RFC4941, Privacy Extensions for Stateless Address Autoconfiguration
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.

Fixes [2ddfcb190f]

11 years agoClarify the problem of identifying a bootp vs dhcp message.
Roy Marples [Sat, 17 Jan 2015 00:32:18 +0000 (00:32 +0000)] 
Clarify the problem of identifying a bootp vs dhcp message.

11 years agoLet packet filters name themselves to avoid confusion.
Roy Marples [Fri, 16 Jan 2015 23:39:03 +0000 (23:39 +0000)] 
Let packet filters name themselves to avoid confusion.

11 years agoIf we cannot open the kernel Packet Filter, give a better error message
Roy Marples [Fri, 16 Jan 2015 23:11:39 +0000 (23:11 +0000)] 
If we cannot open the kernel Packet Filter, give a better error message
and disable IPv4 configuration.

11 years agoInclude paths.h to get _PATH_BPF. Thanks to Joerg Sonnenberger.
Roy Marples [Fri, 16 Jan 2015 23:01:29 +0000 (23:01 +0000)] 
Include paths.h to get _PATH_BPF. Thanks to Joerg Sonnenberger.

11 years agotime_t is not always unsigned.
Roy Marples [Fri, 16 Jan 2015 22:53:40 +0000 (22:53 +0000)] 
time_t is not always unsigned.

11 years agoOnly check DaD for addresses we have actually added ourselves.
Roy Marples [Thu, 8 Jan 2015 13:33:07 +0000 (13:33 +0000)] 
Only check DaD for addresses we have actually added ourselves.

11 years agoAdd an option to disable the generation of autoconf addresses within a RA.
Roy Marples [Thu, 8 Jan 2015 13:31:42 +0000 (13:31 +0000)] 
Add an option to disable the generation of autoconf addresses within a RA.

11 years agoIPv6 kernel autoconf disabled is not an error condition to stop IPv6 from working...
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.

11 years agoWarn about IPv6 kernel autoconf being disabled on BSD platforms.
Roy Marples [Tue, 6 Jan 2015 13:53:54 +0000 (13:53 +0000)] 
Warn about IPv6 kernel autoconf being disabled on BSD platforms.

11 years agoFix another case where we could mistakenly claim ownership of IPv6 RA.
Roy Marples [Tue, 6 Jan 2015 13:42:51 +0000 (13:42 +0000)] 
Fix another case where we could mistakenly claim ownership of IPv6 RA.

11 years agoFix handling of ND6_IFF_OVERRIDE_RTADV on NetBSD.
Roy Marples [Tue, 6 Jan 2015 13:34:24 +0000 (13:34 +0000)] 
Fix handling of ND6_IFF_OVERRIDE_RTADV on NetBSD.

11 years agoOpenBSD fixed their posix_spawn(3) implementation in 5.7
Roy Marples [Mon, 5 Jan 2015 14:12:23 +0000 (14:12 +0000)] 
OpenBSD fixed their posix_spawn(3) implementation in 5.7

11 years agoUpdate copyrights to 2015.
Roy Marples [Fri, 2 Jan 2015 20:03:28 +0000 (20:03 +0000)] 
Update copyrights to 2015.

11 years agoWelcome to 2015!
Roy Marples [Thu, 1 Jan 2015 20:50:48 +0000 (20:50 +0000)] 
Welcome to 2015!

11 years agoOnly release the DHCPv6 lease when dropping it.
Roy Marples [Thu, 1 Jan 2015 20:49:10 +0000 (20:49 +0000)] 
Only release the DHCPv6 lease when dropping it.
Fixes [bc15b90f7a]

11 years agoAdd qnx* to OS detection so we can pass the __EXT define and stay using
Roy Marples [Tue, 23 Dec 2014 09:46:02 +0000 (09:46 +0000)] 
Add qnx* to OS detection so we can pass the __EXT define and stay using
--cstd=c99.

11 years agoundef CMSG_SPACE and use our own define for platforms where CMSG_SPACE does
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.

11 years agoFix compile warnings without INET or INET6 using gcc.
Roy Marples [Sun, 21 Dec 2014 19:00:19 +0000 (19:00 +0000)] 
Fix compile warnings without INET or INET6 using gcc.

11 years agoFix compile on QNX. Thanks to Will Miles.
Roy Marples [Sat, 20 Dec 2014 14:11:38 +0000 (14:11 +0000)] 
Fix compile on QNX. Thanks to Will Miles.

11 years agoGuard against failure in if_discover. Thanks to Will Miles.
Roy Marples [Sat, 20 Dec 2014 14:09:26 +0000 (14:09 +0000)] 
Guard against failure in if_discover. Thanks to Will Miles.

11 years agoUse __restrict rather than restrict.
Roy Marples [Sat, 20 Dec 2014 12:15:07 +0000 (12:15 +0000)] 
Use __restrict rather than restrict.
Thanks to Will Miles.

11 years agoAttempt to define CMSG_SPACE for systems which lack it, like QNX.
Roy Marples [Sat, 20 Dec 2014 11:56:27 +0000 (11:56 +0000)] 
Attempt to define CMSG_SPACE for systems which lack it, like QNX.

11 years agoRelease dhcpcd-6.6.7 v6.6.7
Roy Marples [Fri, 19 Dec 2014 10:45:45 +0000 (10:45 +0000)] 
Release dhcpcd-6.6.7

11 years agoFix build without INET
Roy Marples [Thu, 18 Dec 2014 11:47:09 +0000 (11:47 +0000)] 
Fix build without INET

11 years agoDon't set RA ownership in test mode.
Roy Marples [Thu, 18 Dec 2014 10:09:54 +0000 (10:09 +0000)] 
Don't set RA ownership in test mode.

11 years agoRelease dhcpcd-6.6.6 v6.6.6
Roy Marples [Wed, 17 Dec 2014 20:33:27 +0000 (20:33 +0000)] 
Release dhcpcd-6.6.6

11 years agoDocument some BSD systems lacking the ability to announce IPv6 address flag changes.
Roy Marples [Tue, 16 Dec 2014 22:12:16 +0000 (22:12 +0000)] 
Document some BSD systems lacking the ability to announce IPv6 address flag changes.

11 years agoStore acquired time for each IPv6 address so we can correctly offset
Roy Marples [Tue, 16 Dec 2014 20:20:01 +0000 (20:20 +0000)] 
Store acquired time for each IPv6 address so we can correctly offset
pltime and vltime if we need to re-add them.

11 years agoFor BSD systems stop polling for IPv6 router reachability.
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.

11 years agoThe noalias directive will now remove any IPv4 addresses existing on
Roy Marples [Sat, 13 Dec 2014 13:35:18 +0000 (13:35 +0000)] 
The noalias directive will now remove any IPv4 addresses existing on
the interface when we want to add our own.

11 years agoA server should not NAK an INFORM.
Roy Marples [Fri, 12 Dec 2014 21:52:16 +0000 (21:52 +0000)] 
A server should not NAK an INFORM.

11 years agoClarify timeout and reboot timeout, make it more sane.
Roy Marples [Fri, 12 Dec 2014 21:51:48 +0000 (21:51 +0000)] 
Clarify timeout and reboot timeout, make it more sane.

11 years agoNeed net/route.h
Roy Marples [Thu, 11 Dec 2014 01:29:05 +0000 (01:29 +0000)] 
Need net/route.h

11 years agoInclude linux/rtnetlink.h in config.h rather than each file that needs it.
Roy Marples [Wed, 10 Dec 2014 22:42:12 +0000 (22:42 +0000)] 
Include linux/rtnetlink.h in config.h rather than each file that needs it.
Detect RTM_NEWNEIGH rather than force a define based on __linux__.

11 years agoSpelling
Roy Marples [Wed, 10 Dec 2014 22:39:50 +0000 (22:39 +0000)] 
Spelling

11 years agoRelease dhcpcd-6.6.5 v6.6.5
Roy Marples [Tue, 9 Dec 2014 20:03:11 +0000 (20:03 +0000)] 
Release dhcpcd-6.6.5

11 years agoAllow other processes to handle the DHCP port on the wildcard address.
Roy Marples [Tue, 9 Dec 2014 12:52:52 +0000 (12:52 +0000)] 
Allow other processes to handle the DHCP port on the wildcard address.

11 years agoIf we get another carrier event during the poll for IFF_UP, cancel the poll.
Roy Marples [Tue, 9 Dec 2014 09:45:56 +0000 (09:45 +0000)] 
If we get another carrier event during the poll for IFF_UP, cancel the poll.

11 years agoInstead if giving up if we receive a LINK_UP event before the kernel has set
Roy Marples [Tue, 9 Dec 2014 09:39:30 +0000 (09:39 +0000)] 
Instead if giving up if we receive a LINK_UP event before the kernel has set
IFF_UP, poll for it until it's set or carrier goes down.

11 years agoIf neither dig nor host are present fall back to getent.
Roy Marples [Thu, 4 Dec 2014 13:45:24 +0000 (13:45 +0000)] 
If neither dig nor host are present fall back to getent.
Thanks to admiralnemo, fixes [e0dc4c4459].

11 years agoIFT type does not cleanly match to ARP type so we have to check in each.
Roy Marples [Wed, 3 Dec 2014 09:34:45 +0000 (09:34 +0000)] 
IFT type does not cleanly match to ARP type so we have to check in each.

11 years agoFix a coverity warning.
Roy Marples [Tue, 2 Dec 2014 09:25:14 +0000 (09:25 +0000)] 
Fix a coverity warning.

11 years agoFix prior patch
Roy Marples [Fri, 28 Nov 2014 15:20:01 +0000 (15:20 +0000)] 
Fix prior patch

11 years agoIf STOPPED, set if_down = true when releasing, otherwise false.
Roy Marples [Fri, 28 Nov 2014 15:18:09 +0000 (15:18 +0000)] 
If STOPPED, set if_down = true when releasing, otherwise false.
Let dhcpcd-run-hooks process STOPPED.

11 years agoNote that TEST removes the rapid_commit option from the message.
Roy Marples [Wed, 26 Nov 2014 17:34:50 +0000 (17:34 +0000)] 
Note that TEST removes the rapid_commit option from the message.

11 years agoReport selected profile v6.6.4
Roy Marples [Wed, 26 Nov 2014 15:34:35 +0000 (15:34 +0000)] 
Report selected profile

11 years agoFix a memory error.
Roy Marples [Wed, 26 Nov 2014 15:34:14 +0000 (15:34 +0000)] 
Fix a memory error.

11 years agoRelease dhcpcd-6.6.4
Roy Marples [Wed, 26 Nov 2014 15:01:30 +0000 (15:01 +0000)] 
Release dhcpcd-6.6.4

11 years agoInform the hooks if we're running with debug or not.
Roy Marples [Wed, 26 Nov 2014 14:54:14 +0000 (14:54 +0000)] 
Inform the hooks if we're running with debug or not.

11 years agoRemove unused variable.
Roy Marples [Wed, 26 Nov 2014 13:58:54 +0000 (13:58 +0000)] 
Remove unused variable.

11 years agoRelease dhcpcd-6.6.3 v6.6.3
Roy Marples [Wed, 26 Nov 2014 12:45:19 +0000 (12:45 +0000)] 
Release dhcpcd-6.6.3

11 years agoIf a DHCP lease has expired on reboot, don't expire it right away as that
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.