]> git.ipfire.org Git - thirdparty/dhcpcd.git/log
thirdparty/dhcpcd.git
9 years agoFix changing routes on FreeBSD.
Roy Marples [Fri, 8 Apr 2016 10:49:21 +0000 (10:49 +0000)] 
Fix changing routes on FreeBSD.

9 years agoLog RA's only when it's a new router unless debugging is enabled.
Roy Marples [Fri, 8 Apr 2016 09:38:53 +0000 (09:38 +0000)] 
Log RA's only when it's a new router unless debugging is enabled.
This is because some routers decrease the preferred and valid times
in accordance to their own prefixes and we don't want to needlessly spam
the log.

Fixed [01f7cbd3b1].

9 years agoFix BSD for making routes.
Roy Marples [Fri, 8 Apr 2016 08:29:52 +0000 (08:29 +0000)] 
Fix BSD for making routes.

9 years agoConstify handlert
Roy Marples [Fri, 8 Apr 2016 06:54:43 +0000 (06:54 +0000)] 
Constify handlert

9 years agoFix a bogus static analyzer bug.
Roy Marples [Thu, 7 Apr 2016 20:45:20 +0000 (20:45 +0000)] 
Fix a bogus static analyzer bug.

9 years agoFix compile on BSD.
Roy Marples [Thu, 7 Apr 2016 20:41:51 +0000 (20:41 +0000)] 
Fix compile on BSD.

9 years agoLinux netlink nlmsg_pid is not process id - only the first socket opened
Roy Marples [Thu, 7 Apr 2016 20:35:57 +0000 (20:35 +0000)] 
Linux netlink nlmsg_pid is not process id - only the first socket opened
has that. So after opening the link socket, open a persistent route socket
and record the nlmsg_pid the kernel creates which is guaranteed unique
and won't clash with a process id which can then be ignored by testing it
directly and not that it's some large number.

9 years agoDon't do ipv6 routes if ipv6 is disabled.
Roy Marples [Wed, 6 Apr 2016 20:53:54 +0000 (20:53 +0000)] 
Don't do ipv6 routes if ipv6 is disabled.

9 years agoFix function name
Roy Marples [Wed, 6 Apr 2016 20:53:26 +0000 (20:53 +0000)] 
Fix function name

9 years agoDescope dest and gateway when copying routes. Set RTA_IFP and RTA_IFA when changing...
Roy Marples [Wed, 6 Apr 2016 18:49:13 +0000 (18:49 +0000)] 
Descope dest and gateway when copying routes. Set RTA_IFP and RTA_IFA when changing routes.

9 years agoBring FORCERENEW message in line with others (drop the DHCP_).
Roy Marples [Tue, 5 Apr 2016 13:43:56 +0000 (13:43 +0000)] 
Bring FORCERENEW message in line with others (drop the DHCP_).

9 years agoFix spelling of RECONFIGURE6, fixes [c6f1927f1a].
Roy Marples [Tue, 5 Apr 2016 13:34:47 +0000 (13:34 +0000)] 
Fix spelling of RECONFIGURE6, fixes [c6f1927f1a].

9 years agoFix pidfile_lock compat on Linux.
Roy Marples [Fri, 1 Apr 2016 21:27:22 +0000 (21:27 +0000)] 
Fix pidfile_lock compat on Linux.

9 years agoRemove pidfile handling from dhcpcd and use pidfile_lock(3) from libutil
Roy Marples [Fri, 1 Apr 2016 21:14:28 +0000 (21:14 +0000)] 
Remove pidfile handling from dhcpcd and use pidfile_lock(3) from libutil
instead.
pidfile_lock(3) should be found in NetBSD 8.
Provide a compat shim, from an earlier implementation I wrote still based
around flock if not available on host OS.

9 years agoDescribe how hardware based arping profiles work.
Roy Marples [Wed, 30 Mar 2016 07:08:34 +0000 (07:08 +0000)] 
Describe how hardware based arping profiles work.

9 years agoWhite space police.
Roy Marples [Mon, 28 Mar 2016 20:08:43 +0000 (20:08 +0000)] 
White space police.

9 years agoDocument --with-poll
Roy Marples [Wed, 23 Mar 2016 22:18:00 +0000 (22:18 +0000)] 
Document --with-poll

9 years agoFix compile on Linux.
Roy Marples [Wed, 23 Mar 2016 22:03:16 +0000 (22:03 +0000)] 
Fix compile on Linux.

9 years agoMake eloop a tad easier to use.
Roy Marples [Thu, 17 Mar 2016 14:35:13 +0000 (14:35 +0000)] 
Make eloop a tad easier to use.

9 years agoFix dprintf, thanks to OBATA Akio.
Roy Marples [Wed, 16 Mar 2016 11:26:49 +0000 (11:26 +0000)] 
Fix dprintf, thanks to OBATA Akio.

9 years agoIt's possible to receive routing events for non existant interfaces, so abort gracefu...
Roy Marples [Sun, 13 Mar 2016 19:46:09 +0000 (19:46 +0000)] 
It's possible to receive routing events for non existant interfaces, so abort gracefully rather than asserting.

9 years agoSupport buggy FreeBSD rc system out of the box.
Roy Marples [Sat, 12 Mar 2016 10:52:41 +0000 (10:52 +0000)] 
Support buggy FreeBSD rc system out of the box.

9 years agoFix configure when >1 ld-elf.so.N
Roy Marples [Fri, 11 Mar 2016 20:46:54 +0000 (20:46 +0000)] 
Fix configure when >1 ld-elf.so.N

9 years agoFix configure again
Roy Marples [Fri, 11 Mar 2016 20:37:17 +0000 (20:37 +0000)] 
Fix configure again

9 years agoInitialise struct to pass configure on FreeBSD.
Roy Marples [Fri, 11 Mar 2016 20:29:20 +0000 (20:29 +0000)] 
Initialise struct to pass configure on FreeBSD.

9 years agoFix configure tests
Roy Marples [Fri, 11 Mar 2016 16:44:59 +0000 (16:44 +0000)] 
Fix configure tests

9 years agoUse -Wall -Werror when running configure tests.
Roy Marples [Fri, 11 Mar 2016 16:35:29 +0000 (16:35 +0000)] 
Use -Wall -Werror when running configure tests.

9 years agoFix compile on older platforms which lack O_CLOEXEC.
Roy Marples [Fri, 11 Mar 2016 13:44:42 +0000 (13:44 +0000)] 
Fix compile on older platforms which lack O_CLOEXEC.
Thanks to OBATA Akio.

9 years agoSupport RTF_CONNECTED, soon to be committed to NetBSD.
Roy Marples [Fri, 11 Mar 2016 12:11:47 +0000 (12:11 +0000)] 
Support RTF_CONNECTED, soon to be committed to NetBSD.

9 years agoCorrect help about for localstatedir and PREFIX.
Roy Marples [Thu, 3 Mar 2016 19:59:45 +0000 (19:59 +0000)] 
Correct help about for localstatedir and PREFIX.
Fixes [894a51e239].

9 years agoIf we fail to open kqueue/epoll, abort the loop.
Roy Marples [Sat, 27 Feb 2016 17:19:15 +0000 (17:19 +0000)] 
If we fail to open kqueue/epoll, abort the loop.

9 years agoNow we have a fd lookup table, we can elimiate the need to store
Roy Marples [Fri, 26 Feb 2016 21:22:30 +0000 (21:22 +0000)] 
Now we have a fd lookup table, we can elimiate the need to store
a backpointer to the poll structure in the event.

9 years agoUse a fd lookup table rather than checking each event in turn until we find
Roy Marples [Fri, 26 Feb 2016 21:16:43 +0000 (21:16 +0000)] 
Use a fd lookup table rather than checking each event in turn until we find
the fd.

9 years agoRoll our own reallocarray(3) function because that and the reallocarr(3) functions...
Roy Marples [Fri, 26 Feb 2016 19:45:29 +0000 (19:45 +0000)] 
Roll our own reallocarray(3) function because that and the reallocarr(3) functions aren't portable in eloop.

9 years agoThis comment no longer applies with kqueue(2) and epoll(7).
Roy Marples [Fri, 26 Feb 2016 16:10:36 +0000 (16:10 +0000)] 
This comment no longer applies with kqueue(2) and epoll(7).

9 years agoDescribe eloop better.
Roy Marples [Fri, 26 Feb 2016 16:08:19 +0000 (16:08 +0000)] 
Describe eloop better.
Use more full stops.

9 years agoAdd POLLOUT to the pselect wrapper.
Roy Marples [Fri, 26 Feb 2016 16:04:12 +0000 (16:04 +0000)] 
Add POLLOUT to the pselect wrapper.

9 years agoEnforce pltime < vltime for prefixes as well.
Roy Marples [Sat, 20 Feb 2016 02:35:10 +0000 (02:35 +0000)] 
Enforce pltime < vltime for prefixes as well.

9 years agoExlcude stale or delegated prefixes from timers.
Roy Marples [Sat, 20 Feb 2016 02:16:20 +0000 (02:16 +0000)] 
Exlcude stale or delegated prefixes from timers.

9 years agoEnforce correctness of vltime, pltime, T1 and T2.
Roy Marples [Fri, 19 Feb 2016 22:20:51 +0000 (22:20 +0000)] 
Enforce correctness of vltime, pltime, T1 and T2.
Warn about addresses expiring before T1.
If all addresses expire before T1, violate RFC 3315 22.4 and
present T1 and T2 are zero so dhcpcd will use sane defaults
based on the lowest vltime and pltime.

Fixes [004f2b78ed]

9 years agoSet fp to NULL after fclose() to avoid a potential secondary fclose() if the
Roy Marples [Tue, 16 Feb 2016 09:54:29 +0000 (09:54 +0000)] 
Set fp to NULL after fclose() to avoid a potential secondary fclose() if the
first call failed.
Fixes [a4c18d501a].

9 years agoWe need to log expiry time for the lease as each address has it's own notion.
Roy Marples [Tue, 16 Feb 2016 09:53:12 +0000 (09:53 +0000)] 
We need to log expiry time for the lease as each address has it's own notion.

9 years agoRemove ipv6ra_accept_nopublic and just accept it.
Roy Marples [Mon, 15 Feb 2016 21:27:59 +0000 (21:27 +0000)] 
Remove ipv6ra_accept_nopublic and just accept it.

9 years agoExport STATIC6 to libdhcpcd.
Roy Marples [Mon, 15 Feb 2016 21:19:56 +0000 (21:19 +0000)] 
Export STATIC6 to libdhcpcd.

9 years agoCheck we have arg before accessing it's parsed iaid. Fixes [005c389f71].
Roy Marples [Mon, 15 Feb 2016 17:43:59 +0000 (17:43 +0000)] 
Check we have arg before accessing it's parsed iaid. Fixes [005c389f71].

9 years agoEnsure that env is freed in arraytostr() fails. Fixes [8d24cd2f25].
Roy Marples [Mon, 15 Feb 2016 16:37:13 +0000 (16:37 +0000)] 
Ensure that env is freed in arraytostr() fails. Fixes [8d24cd2f25].

9 years agoFix snapshot building
Roy Marples [Mon, 15 Feb 2016 14:23:51 +0000 (14:23 +0000)] 
Fix snapshot building

9 years agoThis can be const at least.
Roy Marples [Mon, 15 Feb 2016 09:59:38 +0000 (09:59 +0000)] 
This can be const at least.

9 years agoFix compile warning.
Roy Marples [Mon, 15 Feb 2016 09:46:43 +0000 (09:46 +0000)] 
Fix compile warning.

9 years agoFix compile on BSD, [7e6b5d07d5]
Roy Marples [Mon, 15 Feb 2016 09:44:58 +0000 (09:44 +0000)] 
Fix compile on BSD, [7e6b5d07d5]

9 years agoFor the time being, consider STATIC6 as not up
Roy Marples [Sun, 14 Feb 2016 09:53:06 +0000 (09:53 +0000)] 
For the time being, consider STATIC6 as not up

9 years agoFix non IPv6 build.
Roy Marples [Sun, 14 Feb 2016 09:52:48 +0000 (09:52 +0000)] 
Fix non IPv6 build.

9 years agoMake ipv6_newaddr static
Roy Marples [Sun, 14 Feb 2016 09:05:46 +0000 (09:05 +0000)] 
Make ipv6_newaddr static

9 years agoAdd request, inform and inform6 to dhcpcd.conf
Roy Marples [Sun, 14 Feb 2016 08:53:34 +0000 (08:53 +0000)] 
Add request, inform and inform6 to dhcpcd.conf

9 years agoIf we handle >1 static IPv6 address, test them all before running the script.
Roy Marples [Sun, 14 Feb 2016 08:17:35 +0000 (08:17 +0000)] 
If we handle >1 static IPv6 address, test them all before running the script.

9 years agoImplement IPv6 static address, fixes [29417b793e].
Roy Marples [Sun, 14 Feb 2016 08:04:55 +0000 (08:04 +0000)] 
Implement IPv6 static address, fixes [29417b793e].

9 years agofclose the pointer if chmod fails, fixes [b434b7f79e]
Roy Marples [Fri, 12 Feb 2016 19:45:35 +0000 (19:45 +0000)] 
fclose the pointer if chmod fails, fixes [b434b7f79e]

9 years agoFix a potential memory leak if strdup fails, [6d370974e2]
Roy Marples [Fri, 12 Feb 2016 19:37:02 +0000 (19:37 +0000)] 
Fix a potential memory leak if strdup fails, [6d370974e2]

9 years agoChange IF_SSIDSIZE to IF_SSIDLEN to be more clear about it.
Roy Marples [Thu, 11 Feb 2016 16:06:26 +0000 (16:06 +0000)] 
Change IF_SSIDSIZE to IF_SSIDLEN to be more clear about it.
Store an extra char for a NULL terminator solely for debubgging purposes.
A better fix for [be2bbe6e37].

9 years agoFix a potential SSID overflow if the SSID maximum length is extended beyond
Roy Marples [Thu, 11 Feb 2016 15:32:19 +0000 (15:32 +0000)] 
Fix a potential SSID overflow if the SSID maximum length is extended beyond
32 characters in the kernel before dhcpcd.
Fixes [be2bbe6e37]

9 years agoClarify fallingthrough a switch.
Roy Marples [Thu, 11 Feb 2016 15:20:22 +0000 (15:20 +0000)] 
Clarify fallingthrough a switch.
Fixes [fb4c5a403a].

9 years agoFix compat/arc4random() to not stir on every evocation.
Roy Marples [Thu, 11 Feb 2016 15:17:28 +0000 (15:17 +0000)] 
Fix compat/arc4random() to not stir on every evocation.
Fixes [24bee9333b]

9 years agoComment out dead assignment.
Roy Marples [Fri, 5 Feb 2016 21:29:47 +0000 (21:29 +0000)] 
Comment out dead assignment.

9 years agoRemove debug
Roy Marples [Fri, 5 Feb 2016 14:30:08 +0000 (14:30 +0000)] 
Remove debug

9 years agoAllow embedded comments.
Roy Marples [Fri, 5 Feb 2016 14:28:08 +0000 (14:28 +0000)] 
Allow embedded comments.

9 years agoFix activating a stopped interface.
Roy Marples [Thu, 4 Feb 2016 21:51:10 +0000 (21:51 +0000)] 
Fix activating a stopped interface.

9 years agoWhen activating an interface, bring up a basic config that does nothing.
Roy Marples [Thu, 4 Feb 2016 21:42:14 +0000 (21:42 +0000)] 
When activating an interface, bring up a basic config that does nothing.
Then apply enough of the config for the base protocol, passed via an
argument, to work.

This means that when a prefix is delegated to an inactive interface, it
won't magically start configuring IPv4 on it.

9 years agoIntroduce IF_INACTIVE, IF_ACTIVE and IF_ACTIVE_USER flags. The intent is that IF_ACTI...
Roy Marples [Thu, 4 Feb 2016 10:43:16 +0000 (10:43 +0000)] 
Introduce IF_INACTIVE, IF_ACTIVE and IF_ACTIVE_USER flags. The intent is that IF_ACTIVE is an interface is active with a system config and IF_ACTIVE_USER with a user config.

9 years agoActivate interfaces to delegate to when we start DHCPv6,
Roy Marples [Thu, 4 Feb 2016 10:03:03 +0000 (10:03 +0000)] 
Activate interfaces to delegate to when we start DHCPv6,
not when we receive a REPLY.

9 years agoReturn a better error if we don't find our interface.
Roy Marples [Thu, 4 Feb 2016 10:00:00 +0000 (10:00 +0000)] 
Return a better error if we don't find our interface.

9 years agoTouched these in 2016.
Roy Marples [Wed, 3 Feb 2016 11:07:33 +0000 (11:07 +0000)] 
Touched these in 2016.

9 years agoFix parsing prefix_len
Roy Marples [Wed, 3 Feb 2016 10:15:34 +0000 (10:15 +0000)] 
Fix parsing prefix_len

9 years agoDon't be gready in allocating space for extra SLA's if we overflow 64 bit prefix.
Roy Marples [Wed, 3 Feb 2016 01:17:28 +0000 (01:17 +0000)] 
Don't be gready in allocating space for extra SLA's if we overflow 64 bit prefix.

9 years agoFix copying some IPv6 route masks on BSD.
Roy Marples [Wed, 3 Feb 2016 01:15:41 +0000 (01:15 +0000)] 
Fix copying some IPv6 route masks on BSD.

9 years agoMove ROUNDUP8 to common.h as it's not IPv6 specific.
Roy Marples [Tue, 2 Feb 2016 23:59:10 +0000 (23:59 +0000)] 
Move ROUNDUP8 to common.h as it's not IPv6 specific.

9 years agoFix Prefix Delegation assigning the SLA in the correct place.
Roy Marples [Tue, 2 Feb 2016 23:55:52 +0000 (23:55 +0000)] 
Fix Prefix Delegation assigning the SLA in the correct place.

9 years agoUse fls64 instead of ffs64 because we're interested in how many bits
Roy Marples [Tue, 2 Feb 2016 22:52:40 +0000 (22:52 +0000)] 
Use fls64 instead of ffs64 because we're interested in how many bits
a number is so it fits.

9 years agoAllow multiple automatic SLA if no SLA is set to 0.
Roy Marples [Tue, 2 Feb 2016 22:45:15 +0000 (22:45 +0000)] 
Allow multiple automatic SLA if no SLA is set to 0.

9 years agoReduce some more casts.
Roy Marples [Mon, 1 Feb 2016 23:32:24 +0000 (23:32 +0000)] 
Reduce some more casts.

9 years agoReduce needless casts on void *
Roy Marples [Mon, 1 Feb 2016 22:58:30 +0000 (22:58 +0000)] 
Reduce needless casts on void *

9 years agoDo the same for IPv6 as the prior patch.
Roy Marples [Mon, 1 Feb 2016 22:47:46 +0000 (22:47 +0000)] 
Do the same for IPv6 as the prior patch.

9 years agoFix a crash where existing routes dhcpcd wants to parse have an ip address
Roy Marples [Mon, 1 Feb 2016 22:16:26 +0000 (22:16 +0000)] 
Fix a crash where existing routes dhcpcd wants to parse have an ip address
as a gateway.
Thanks to Christos Zoulas.

9 years agoAllow a suffix of 0 to mean a slaac style PD address.
Roy Marples [Fri, 29 Jan 2016 12:01:21 +0000 (12:01 +0000)] 
Allow a suffix of 0 to mean a slaac style PD address.

9 years agoFix compile on Linux
Roy Marples [Fri, 29 Jan 2016 11:39:12 +0000 (11:39 +0000)] 
Fix compile on Linux

9 years agoAllow the suffix of PD addresses to be configurable.
Roy Marples [Fri, 29 Jan 2016 11:36:05 +0000 (11:36 +0000)] 
Allow the suffix of PD addresses to be configurable.
Fixes [0666660018].

9 years agoRemove our internal ffs32 and just use bitops.h
Roy Marples [Fri, 29 Jan 2016 11:31:54 +0000 (11:31 +0000)] 
Remove our internal ffs32 and just use bitops.h

9 years agoUse ffs64(3) instead of ffs(3) when calculating to see if we can fit the
Roy Marples [Fri, 29 Jan 2016 10:18:02 +0000 (10:18 +0000)] 
Use ffs64(3) instead of ffs(3) when calculating to see if we can fit the
user number inside the resultant length given the prefix length, so we can
use the whole of the user number (64 bits) if needed.

Add a compat ffs64(3) implementation from NetBSD if none found on the platform.

9 years agoMax prefix to request is really 120
Roy Marples [Fri, 29 Jan 2016 10:09:35 +0000 (10:09 +0000)] 
Max prefix to request is really 120

9 years agoA blank hostname is not a valid hostname
Roy Marples [Mon, 25 Jan 2016 10:47:32 +0000 (10:47 +0000)] 
A blank hostname is not a valid hostname

9 years agoMove the queue.h test to just before our structures as a system library
Roy Marples [Fri, 22 Jan 2016 13:47:05 +0000 (13:47 +0000)] 
Move the queue.h test to just before our structures as a system library
could have already pulled the system one in.

9 years agoMove eloop structure inside eloop.c - the outside has no business knowing it.
Roy Marples [Fri, 22 Jan 2016 13:42:13 +0000 (13:42 +0000)] 
Move eloop structure inside eloop.c - the outside has no business knowing it.
Add more defines to better support pollts, ppoll and pselect.

9 years agoFix build without INET
Roy Marples [Fri, 22 Jan 2016 10:11:16 +0000 (10:11 +0000)] 
Fix build without INET

9 years agoCheck return value of snprintf and ipv6_printaddr.
Roy Marples [Fri, 22 Jan 2016 10:05:47 +0000 (10:05 +0000)] 
Check return value of snprintf and ipv6_printaddr.
This is not really needed (unless you have a buggy libc) as the correct bounds
are checked elsewhere, but it's hard to see that, hence this change.
Fixes CVE-2014-7913.

9 years agoFix delegation activating interfaces. v6.10.1
Roy Marples [Wed, 20 Jan 2016 19:08:12 +0000 (19:08 +0000)] 
Fix delegation activating interfaces.

9 years agoRelease dhcpcd-6.10.1
Roy Marples [Wed, 20 Jan 2016 17:41:12 +0000 (17:41 +0000)] 
Release dhcpcd-6.10.1

9 years agoRemove unused prototypes.
Roy Marples [Thu, 14 Jan 2016 18:10:35 +0000 (18:10 +0000)] 
Remove unused prototypes.

9 years agoAdd the -1, --oneshot option which causes dhcpcd to exit once an
Roy Marples [Thu, 14 Jan 2016 17:05:16 +0000 (17:05 +0000)] 
Add the -1, --oneshot option which causes dhcpcd to exit once an
interface has been configured.

9 years agoImprove interval arrival and departure when running on a fixed interface list.
Roy Marples [Thu, 14 Jan 2016 13:43:15 +0000 (13:43 +0000)] 
Improve interval arrival and departure when running on a fixed interface list.

9 years agoOnly stop the interface if it's active when the interface departs.
Roy Marples [Mon, 11 Jan 2016 14:02:01 +0000 (14:02 +0000)] 
Only stop the interface if it's active when the interface departs.
Fixes [97eb3351d3].

9 years agoReduce mallocs when printing pidfile
Roy Marples [Thu, 7 Jan 2016 23:37:14 +0000 (23:37 +0000)] 
Reduce mallocs when printing pidfile