]>
git.ipfire.org Git - thirdparty/dhcpcd.git/log
Roy Marples [Fri, 26 Feb 2016 16:04:12 +0000 (16:04 +0000)]
Add POLLOUT to the pselect wrapper.
Roy Marples [Sat, 20 Feb 2016 02:35:10 +0000 (02:35 +0000)]
Enforce pltime < vltime for prefixes as well.
Roy Marples [Sat, 20 Feb 2016 02:16:20 +0000 (02:16 +0000)]
Exlcude stale or delegated prefixes from timers.
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 ]
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 ].
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.
Roy Marples [Mon, 15 Feb 2016 21:27:59 +0000 (21:27 +0000)]
Remove ipv6ra_accept_nopublic and just accept it.
Roy Marples [Mon, 15 Feb 2016 21:19:56 +0000 (21:19 +0000)]
Export STATIC6 to libdhcpcd.
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 ].
Roy Marples [Mon, 15 Feb 2016 16:37:13 +0000 (16:37 +0000)]
Ensure that env is freed in arraytostr() fails. Fixes [
8d24cd2f25 ].
Roy Marples [Mon, 15 Feb 2016 14:23:51 +0000 (14:23 +0000)]
Fix snapshot building
Roy Marples [Mon, 15 Feb 2016 09:59:38 +0000 (09:59 +0000)]
This can be const at least.
Roy Marples [Mon, 15 Feb 2016 09:46:43 +0000 (09:46 +0000)]
Fix compile warning.
Roy Marples [Mon, 15 Feb 2016 09:44:58 +0000 (09:44 +0000)]
Fix compile on BSD, [
7e6b5d07d5 ]
Roy Marples [Sun, 14 Feb 2016 09:53:06 +0000 (09:53 +0000)]
For the time being, consider STATIC6 as not up
Roy Marples [Sun, 14 Feb 2016 09:52:48 +0000 (09:52 +0000)]
Fix non IPv6 build.
Roy Marples [Sun, 14 Feb 2016 09:05:46 +0000 (09:05 +0000)]
Make ipv6_newaddr static
Roy Marples [Sun, 14 Feb 2016 08:53:34 +0000 (08:53 +0000)]
Add request, inform and inform6 to dhcpcd.conf
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.
Roy Marples [Sun, 14 Feb 2016 08:04:55 +0000 (08:04 +0000)]
Implement IPv6 static address, fixes [
29417b793e ].
Roy Marples [Fri, 12 Feb 2016 19:45:35 +0000 (19:45 +0000)]
fclose the pointer if chmod fails, fixes [
b434b7f79e ]
Roy Marples [Fri, 12 Feb 2016 19:37:02 +0000 (19:37 +0000)]
Fix a potential memory leak if strdup fails, [
6d370974e2 ]
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 ].
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 ]
Roy Marples [Thu, 11 Feb 2016 15:20:22 +0000 (15:20 +0000)]
Clarify fallingthrough a switch.
Fixes [
fb4c5a403a ].
Roy Marples [Thu, 11 Feb 2016 15:17:28 +0000 (15:17 +0000)]
Fix compat/arc4random() to not stir on every evocation.
Fixes [
24bee9333b ]
Roy Marples [Fri, 5 Feb 2016 21:29:47 +0000 (21:29 +0000)]
Comment out dead assignment.
Roy Marples [Fri, 5 Feb 2016 14:30:08 +0000 (14:30 +0000)]
Remove debug
Roy Marples [Fri, 5 Feb 2016 14:28:08 +0000 (14:28 +0000)]
Allow embedded comments.
Roy Marples [Thu, 4 Feb 2016 21:51:10 +0000 (21:51 +0000)]
Fix activating a stopped interface.
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.
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.
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.
Roy Marples [Thu, 4 Feb 2016 10:00:00 +0000 (10:00 +0000)]
Return a better error if we don't find our interface.
Roy Marples [Wed, 3 Feb 2016 11:07:33 +0000 (11:07 +0000)]
Touched these in 2016.
Roy Marples [Wed, 3 Feb 2016 10:15:34 +0000 (10:15 +0000)]
Fix parsing prefix_len
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.
Roy Marples [Wed, 3 Feb 2016 01:15:41 +0000 (01:15 +0000)]
Fix copying some IPv6 route masks on BSD.
Roy Marples [Tue, 2 Feb 2016 23:59:10 +0000 (23:59 +0000)]
Move ROUNDUP8 to common.h as it's not IPv6 specific.
Roy Marples [Tue, 2 Feb 2016 23:55:52 +0000 (23:55 +0000)]
Fix Prefix Delegation assigning the SLA in the correct place.
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.
Roy Marples [Tue, 2 Feb 2016 22:45:15 +0000 (22:45 +0000)]
Allow multiple automatic SLA if no SLA is set to 0.
Roy Marples [Mon, 1 Feb 2016 23:32:24 +0000 (23:32 +0000)]
Reduce some more casts.
Roy Marples [Mon, 1 Feb 2016 22:58:30 +0000 (22:58 +0000)]
Reduce needless casts on void *
Roy Marples [Mon, 1 Feb 2016 22:47:46 +0000 (22:47 +0000)]
Do the same for IPv6 as the prior patch.
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.
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.
Roy Marples [Fri, 29 Jan 2016 11:39:12 +0000 (11:39 +0000)]
Fix compile on Linux
Roy Marples [Fri, 29 Jan 2016 11:36:05 +0000 (11:36 +0000)]
Allow the suffix of PD addresses to be configurable.
Fixes [
0666660018 ].
Roy Marples [Fri, 29 Jan 2016 11:31:54 +0000 (11:31 +0000)]
Remove our internal ffs32 and just use bitops.h
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.
Roy Marples [Fri, 29 Jan 2016 10:09:35 +0000 (10:09 +0000)]
Max prefix to request is really 120
Roy Marples [Mon, 25 Jan 2016 10:47:32 +0000 (10:47 +0000)]
A blank hostname is not a valid hostname
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.
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.
Roy Marples [Fri, 22 Jan 2016 10:11:16 +0000 (10:11 +0000)]
Fix build without INET
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.
Roy Marples [Wed, 20 Jan 2016 19:08:12 +0000 (19:08 +0000)]
Fix delegation activating interfaces.
Roy Marples [Wed, 20 Jan 2016 17:41:12 +0000 (17:41 +0000)]
Release dhcpcd-6.10.1
Roy Marples [Thu, 14 Jan 2016 18:10:35 +0000 (18:10 +0000)]
Remove unused prototypes.
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.
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.
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 ].
Roy Marples [Thu, 7 Jan 2016 23:37:14 +0000 (23:37 +0000)]
Reduce mallocs when printing pidfile
Roy Marples [Thu, 7 Jan 2016 19:59:17 +0000 (19:59 +0000)]
Import example hook scripts as well - upstream Makefile will sort it out.
Roy Marples [Thu, 7 Jan 2016 19:53:50 +0000 (19:53 +0000)]
Fix config.mk spacing
Roy Marples [Thu, 7 Jan 2016 19:52:54 +0000 (19:52 +0000)]
Add -P, --printpidfile to print the pidfile dhcpcd will use to stdout.
Roy Marples [Thu, 7 Jan 2016 16:47:19 +0000 (16:47 +0000)]
Release dhcpcd-6.10.0
Roy Marples [Thu, 7 Jan 2016 16:15:02 +0000 (16:15 +0000)]
Add PROBE state so we can reject DHCP messages whilst probing.
Another fix for [
4728faad35 ] and [
07675d4330 ].
Remove RTV_MTU check here as it's not correct (mistakenly added to this commit).
Roy Marples [Thu, 7 Jan 2016 13:15:04 +0000 (13:15 +0000)]
Treat OFFER as ACK if both parties set rapid commit.
Allow ACK in DISCOVER if both parties set rapid commit.
Fixes [
4728faad35 ] and [
07675d4330 ].
Roy Marples [Wed, 6 Jan 2016 14:29:26 +0000 (14:29 +0000)]
Cast away a gcc warning.
Roy Marples [Wed, 6 Jan 2016 14:06:40 +0000 (14:06 +0000)]
Updated in 2016
Roy Marples [Wed, 6 Jan 2016 12:59:38 +0000 (12:59 +0000)]
Fix compile on Linux
Roy Marples [Wed, 6 Jan 2016 11:00:59 +0000 (11:00 +0000)]
OpenBSD does not have ENODATA, use EOVERFLOW instead.
Roy Marples [Wed, 6 Jan 2016 10:54:36 +0000 (10:54 +0000)]
If we are to add/delete/change a route but have not yet daemonised,
flag that we are to track the parent pid.
On successful route message, remember the sequence number.
Once daemonised, ignore messages from the parent pid until we find
the saved sequence number - at this point remove the flag to track parent pid.
This fixes an issue where we didn't correctly ignore messages we generated
before forking but catching them in the child process.
Roy Marples [Wed, 6 Jan 2016 10:21:22 +0000 (10:21 +0000)]
Correct function to report error for.
Roy Marples [Tue, 5 Jan 2016 17:09:37 +0000 (17:09 +0000)]
Set route/netlink seq number correctly.
Roy Marples [Tue, 5 Jan 2016 13:49:41 +0000 (13:49 +0000)]
Use ERANGE to differentiate from EINVAL to detect option length overflow.
Roy Marples [Mon, 4 Jan 2016 23:47:38 +0000 (23:47 +0000)]
Updated in 2016.
Roy Marples [Mon, 4 Jan 2016 23:31:43 +0000 (23:31 +0000)]
Ensure that option length fits inside data length less option size.
Thanks to Nico Golde for the report.
Fixes CVE-2016-1504
Roy Marples [Mon, 4 Jan 2016 17:45:54 +0000 (17:45 +0000)]
2016
Roy Marples [Mon, 4 Jan 2016 17:43:28 +0000 (17:43 +0000)]
dhcp_optlen now returns the length of the data we can sanely work on
given the option definition and data length.
Call dhcp_optlen in dhcp_envoption1 to take into ensure these bounds
are not overstepped.
Fixes an issue reported by Nico Golde where extra undersized data was
present in the option.
An example of this would be an array of uint16's with a trailing byte.
Fixes CVE-2016-1503
Roy Marples [Mon, 4 Jan 2016 17:15:15 +0000 (17:15 +0000)]
Welcome to 2016
Roy Marples [Mon, 4 Jan 2016 17:14:35 +0000 (17:14 +0000)]
Fix some definitions
Roy Marples [Thu, 31 Dec 2015 20:24:24 +0000 (20:24 +0000)]
80 chars wrap
Roy Marples [Thu, 31 Dec 2015 17:46:46 +0000 (17:46 +0000)]
htosn requires arpa/inet.h on kFreeBSD.
Fixes [
1987e7b3a3 ].
Roy Marples [Thu, 31 Dec 2015 17:46:05 +0000 (17:46 +0000)]
Detect kFreeBSD correctly.
Thanks to Christoph Egger for providing a temporary build host.
Partial fix for [
1987e7b3a3 ].
Roy Marples [Thu, 31 Dec 2015 16:27:44 +0000 (16:27 +0000)]
Remove FreeBSD specific defines and include the needed headers via config.h.
This allows better compile for derivatives such as kFreeBSD.
For kFreeBSD, also define BSD.
Fixes [
1987e7b3a3 ].
Roy Marples [Thu, 31 Dec 2015 16:02:53 +0000 (16:02 +0000)]
Fix compile on FreeBSD
Roy Marples [Thu, 24 Dec 2015 15:17:44 +0000 (15:17 +0000)]
Improve error logging of packet parsing.
Roy Marples [Thu, 24 Dec 2015 11:20:55 +0000 (11:20 +0000)]
Make DHCPv6 Client FQDN option allowed to be NULL, matching the DHCPv4 option.
Roy Marples [Wed, 23 Dec 2015 00:39:56 +0000 (00:39 +0000)]
Try and move YP config to an example hook script.
Roy Marples [Tue, 22 Dec 2015 23:46:17 +0000 (23:46 +0000)]
Install example hooks
Roy Marples [Tue, 22 Dec 2015 22:50:34 +0000 (22:50 +0000)]
Grudgingly accede to the vocal minority that dhcpcd should not attempt to
start wpa_supplicant by default on a wireless interface, even if a wpa_ctrl interface is configured for it and wpa_supplicant is not yet started.
Roy Marples [Tue, 22 Dec 2015 22:33:32 +0000 (22:33 +0000)]
Move lookup-hostname hook to the example directory.
Roy Marples [Tue, 22 Dec 2015 22:26:09 +0000 (22:26 +0000)]
Install hooks that should not be installed by default into
$(datadir)/dhcpcd/hooks.
Start with timezone.
Roy Marples [Mon, 21 Dec 2015 14:28:19 +0000 (14:28 +0000)]
If we lack an index or interface protocol in the routing message,
check if the gateway is a link address, if so that's our route interface.
Roy Marples [Mon, 21 Dec 2015 14:26:34 +0000 (14:26 +0000)]
Whitespace
Roy Marples [Mon, 21 Dec 2015 11:07:32 +0000 (11:07 +0000)]
Fix a bogus gcc warning about a potential signed overflow.
Roy Marples [Mon, 21 Dec 2015 11:07:04 +0000 (11:07 +0000)]
-g must go via the command socket as it's no longer SIGUSR1