]> git.ipfire.org Git - thirdparty/dhcpcd.git/log
thirdparty/dhcpcd.git
10 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

10 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

10 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.

10 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.

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

10 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.

10 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.

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

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

10 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.

10 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.

10 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].

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

10 years agoImport example hook scripts as well - upstream Makefile will sort it out.
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.

10 years agoFix config.mk spacing
Roy Marples [Thu, 7 Jan 2016 19:53:50 +0000 (19:53 +0000)] 
Fix config.mk spacing

10 years agoAdd -P, --printpidfile to print the pidfile dhcpcd will use to stdout.
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.

10 years agoRelease dhcpcd-6.10.0 v6.10.0
Roy Marples [Thu, 7 Jan 2016 16:47:19 +0000 (16:47 +0000)] 
Release dhcpcd-6.10.0

10 years agoAdd PROBE state so we can reject DHCP messages whilst probing.
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).

10 years agoTreat OFFER as ACK if both parties set rapid 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].

10 years agoCast away a gcc warning.
Roy Marples [Wed, 6 Jan 2016 14:29:26 +0000 (14:29 +0000)] 
Cast away a gcc warning.

10 years agoUpdated in 2016
Roy Marples [Wed, 6 Jan 2016 14:06:40 +0000 (14:06 +0000)] 
Updated in 2016

10 years agoFix compile on Linux
Roy Marples [Wed, 6 Jan 2016 12:59:38 +0000 (12:59 +0000)] 
Fix compile on Linux

10 years agoOpenBSD does not have ENODATA, use EOVERFLOW instead.
Roy Marples [Wed, 6 Jan 2016 11:00:59 +0000 (11:00 +0000)] 
OpenBSD does not have ENODATA, use EOVERFLOW instead.

10 years agoIf we are to add/delete/change a route but have not yet daemonised,
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.

10 years agoCorrect function to report error for.
Roy Marples [Wed, 6 Jan 2016 10:21:22 +0000 (10:21 +0000)] 
Correct function to report error for.

10 years agoSet route/netlink seq number correctly.
Roy Marples [Tue, 5 Jan 2016 17:09:37 +0000 (17:09 +0000)] 
Set route/netlink seq number correctly.

10 years agoUse ERANGE to differentiate from EINVAL to detect option length overflow.
Roy Marples [Tue, 5 Jan 2016 13:49:41 +0000 (13:49 +0000)] 
Use ERANGE to differentiate from EINVAL to detect option length overflow.

10 years agoUpdated in 2016.
Roy Marples [Mon, 4 Jan 2016 23:47:38 +0000 (23:47 +0000)] 
Updated in 2016.

10 years agoEnsure that option length fits inside data length less option size.
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

10 years ago2016
Roy Marples [Mon, 4 Jan 2016 17:45:54 +0000 (17:45 +0000)] 
2016

10 years agodhcp_optlen now returns the length of the data we can sanely work on
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

10 years agoWelcome to 2016
Roy Marples [Mon, 4 Jan 2016 17:15:15 +0000 (17:15 +0000)] 
Welcome to 2016

10 years agoFix some definitions
Roy Marples [Mon, 4 Jan 2016 17:14:35 +0000 (17:14 +0000)] 
Fix some definitions

10 years ago80 chars wrap
Roy Marples [Thu, 31 Dec 2015 20:24:24 +0000 (20:24 +0000)] 
80 chars wrap

10 years agohtosn requires arpa/inet.h on kFreeBSD.
Roy Marples [Thu, 31 Dec 2015 17:46:46 +0000 (17:46 +0000)] 
htosn requires arpa/inet.h on kFreeBSD.
Fixes [1987e7b3a3].

10 years agoDetect kFreeBSD correctly.
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].

10 years agoRemove FreeBSD specific defines and include the needed headers via config.h.
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].

10 years agoFix compile on FreeBSD
Roy Marples [Thu, 31 Dec 2015 16:02:53 +0000 (16:02 +0000)] 
Fix compile on FreeBSD

10 years agoImprove error logging of packet parsing.
Roy Marples [Thu, 24 Dec 2015 15:17:44 +0000 (15:17 +0000)] 
Improve error logging of packet parsing.

10 years agoMake DHCPv6 Client FQDN option allowed to be NULL, matching the DHCPv4 option.
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.

10 years agoTry and move YP config to an example hook script.
Roy Marples [Wed, 23 Dec 2015 00:39:56 +0000 (00:39 +0000)] 
Try and move YP config to an example hook script.

10 years agoInstall example hooks
Roy Marples [Tue, 22 Dec 2015 23:46:17 +0000 (23:46 +0000)] 
Install example hooks

10 years agoGrudgingly accede to the vocal minority that dhcpcd should not attempt to
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.

10 years agoMove lookup-hostname hook to the example directory.
Roy Marples [Tue, 22 Dec 2015 22:33:32 +0000 (22:33 +0000)] 
Move lookup-hostname hook to the example directory.

10 years agoInstall hooks that should not be installed by default into
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.

10 years agoIf we lack an index or interface protocol in the routing message,
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.

10 years agoWhitespace
Roy Marples [Mon, 21 Dec 2015 14:26:34 +0000 (14:26 +0000)] 
Whitespace

10 years agoFix a bogus gcc warning about a potential signed overflow.
Roy Marples [Mon, 21 Dec 2015 11:07:32 +0000 (11:07 +0000)] 
Fix a bogus gcc warning about a potential signed overflow.

10 years ago-g must go via the command socket as it's no longer SIGUSR1
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

10 years agoNote that systemd/udev leaks memory where-as the eudev fork of udev does not.
Roy Marples [Thu, 17 Dec 2015 22:42:24 +0000 (22:42 +0000)] 
Note that systemd/udev leaks memory where-as the eudev fork of udev does not.

10 years agoRemove this pointless debug.
Roy Marples [Thu, 17 Dec 2015 13:51:56 +0000 (13:51 +0000)] 
Remove this pointless debug.

10 years agoWhen stopping and starting interfaces, just toggle the active flag
Roy Marples [Thu, 17 Dec 2015 12:37:07 +0000 (12:37 +0000)] 
When stopping and starting interfaces, just toggle the active flag
and prestart if needed instead of adding them to the list they are already now in.

10 years agoCheck active before link status when sorting
Roy Marples [Thu, 17 Dec 2015 12:35:33 +0000 (12:35 +0000)] 
Check active before link status when sorting

10 years agoNow all interfaces are loaded, don't try to load one for delegation.
Roy Marples [Thu, 17 Dec 2015 09:22:50 +0000 (09:22 +0000)] 
Now all interfaces are loaded, don't try to load one for delegation.

10 years agoND6 and DHCPv6 should only work on active interfaces.
Roy Marples [Thu, 17 Dec 2015 09:08:09 +0000 (09:08 +0000)] 
ND6 and DHCPv6 should only work on active interfaces.

10 years agoInstead of maintaining a seperate list, instead mark each interface as active
Roy Marples [Thu, 17 Dec 2015 02:34:36 +0000 (02:34 +0000)] 
Instead of maintaining a seperate list, instead mark each interface as active
dhcpcd will actively work on.
This will allow dhcpcd to move addresses around interfaces much more easily
as well.

10 years agoWhen parsing the routing table, create an interface for any interfaces dhcpcd
Roy Marples [Thu, 17 Dec 2015 00:25:03 +0000 (00:25 +0000)] 
When parsing the routing table, create an interface for any interfaces dhcpcd
is not directly controling in ctx->oifaces.
This allows dhcpcd to manipulate the correct route at all times.

Fixes [ebdb4b447a].

10 years agoautoconf --includedir is where include files are to be installed, not where we
Roy Marples [Tue, 15 Dec 2015 23:06:59 +0000 (23:06 +0000)] 
autoconf --includedir is where include files are to be installed, not where we
should look during compile.
Thanks to Nate Karstens.

10 years agoSend gratuitous ARP each time we apply our IP address.
Roy Marples [Tue, 15 Dec 2015 22:51:36 +0000 (22:51 +0000)] 
Send gratuitous ARP each time we apply our IP address.

10 years agoReturn if we forked or not after dhcp_bind.
Roy Marples [Tue, 15 Dec 2015 22:50:24 +0000 (22:50 +0000)] 
Return if we forked or not after dhcp_bind.

10 years agocopy the configured hostname using the buffer length,
Roy Marples [Tue, 15 Dec 2015 19:51:49 +0000 (19:51 +0000)] 
copy the configured hostname using the buffer length,
Not the size of the pointer.
Thanks to Sem.

Fixes [7da8d97fc4].

10 years agoTest for ETHERTYPE_IP as the protocol type in the ARP BPF filter.
Roy Marples [Tue, 15 Dec 2015 14:45:55 +0000 (14:45 +0000)] 
Test for ETHERTYPE_IP as the protocol type in the ARP BPF filter.

10 years agoOptimise the ARP BPF filter, thanks to Nate Karstens.
Roy Marples [Tue, 15 Dec 2015 14:30:39 +0000 (14:30 +0000)] 
Optimise the ARP BPF filter, thanks to Nate Karstens.

10 years agoWork once more with INET6 less kernels.
Roy Marples [Mon, 7 Dec 2015 07:43:49 +0000 (07:43 +0000)] 
Work once more with INET6 less kernels.

10 years agoFix the manpage with reality, [9e55971edd].
Roy Marples [Fri, 4 Dec 2015 14:54:45 +0000 (14:54 +0000)] 
Fix the manpage with reality, [9e55971edd].

10 years agonoptions requires an argument.
Roy Marples [Fri, 4 Dec 2015 14:41:27 +0000 (14:41 +0000)] 
noptions requires an argument.
Fixes [9e55971edd].

10 years agoFix 2 NULL de-references, thanks to Christos.
Roy Marples [Fri, 4 Dec 2015 12:41:25 +0000 (12:41 +0000)] 
Fix 2 NULL de-references, thanks to Christos.

10 years agoFix compile without IPv6.
Roy Marples [Thu, 3 Dec 2015 20:43:41 +0000 (20:43 +0000)] 
Fix compile without IPv6.

10 years agoRelease dhcpcd-6.9.4 v6.9.4
Roy Marples [Mon, 30 Nov 2015 15:31:02 +0000 (15:31 +0000)] 
Release dhcpcd-6.9.4

10 years agoIf dumping lease returns an error, return it to userland.
Roy Marples [Thu, 19 Nov 2015 11:00:34 +0000 (11:00 +0000)] 
If dumping lease returns an error, return it to userland.

10 years agoIf testing or dumping leases, don't send to syslog only stdout/stderr.
Roy Marples [Thu, 19 Nov 2015 10:04:23 +0000 (10:04 +0000)] 
If testing or dumping leases, don't send to syslog only stdout/stderr.
Fixes [e4a1d282c9].

10 years agoAlways send LOG_DEBUG to syslog(3) even if we are in quiet mode.
Roy Marples [Thu, 19 Nov 2015 09:59:29 +0000 (09:59 +0000)] 
Always send LOG_DEBUG to syslog(3) even if we are in quiet mode.
It's upto syslog to filter it.
While here, ensure that errno is set in the HAVE_PRINTF_M case for each
time we use it.

10 years agoFix adding static routes via a gateway on BSD.
Roy Marples [Wed, 18 Nov 2015 22:57:48 +0000 (22:57 +0000)] 
Fix adding static routes via a gateway on BSD.

10 years agoFix adding host routes via a gateway on Linux.
Roy Marples [Wed, 18 Nov 2015 21:22:15 +0000 (21:22 +0000)] 
Fix adding host routes via a gateway on Linux.

10 years agoIf a host route in static routes, don't then set a netmask based on the route.
Roy Marples [Wed, 18 Nov 2015 21:21:30 +0000 (21:21 +0000)] 
If a host route in static routes, don't then set a netmask based on the route.

10 years agoIf dumping leases, skip authentication and address expiry checks.
Roy Marples [Wed, 18 Nov 2015 17:06:32 +0000 (17:06 +0000)] 
If dumping leases, skip authentication and address expiry checks.

10 years agoProtect against underflow.
Roy Marples [Wed, 18 Nov 2015 13:52:52 +0000 (13:52 +0000)] 
Protect against underflow.

10 years agoFix dumping DHCPv6 leases.
Roy Marples [Wed, 18 Nov 2015 13:44:42 +0000 (13:44 +0000)] 
Fix dumping DHCPv6 leases.

10 years agoFix memory issue with prior commit.
Roy Marples [Wed, 18 Nov 2015 12:06:47 +0000 (12:06 +0000)] 
Fix memory issue with prior commit.

10 years ago-U, --dumplease now works with standard input.
Roy Marples [Wed, 18 Nov 2015 11:59:11 +0000 (11:59 +0000)] 
-U, --dumplease now works with standard input.
It no longer works with a filename.

10 years agoUse a GCC pragma directive to mask off the warning about not careing about the read...
Roy Marples [Fri, 13 Nov 2015 11:27:38 +0000 (11:27 +0000)] 
Use a GCC pragma directive to mask off the warning about not careing about the read result, because we don't.

10 years agoRemove unused var.
Roy Marples [Fri, 13 Nov 2015 11:21:36 +0000 (11:21 +0000)] 
Remove unused var.

10 years agoObey the hostname_short option even for FQDN hostnames passed via config.
Roy Marples [Fri, 13 Nov 2015 11:18:44 +0000 (11:18 +0000)] 
Obey the hostname_short option even for FQDN hostnames passed via config.
Fixes [c7c4e51c72] based on a patch by sem@altlinux.org.

10 years agoAdd a -N --renew option to renew any existing address early, similar to the
Roy Marples [Fri, 13 Nov 2015 10:37:27 +0000 (10:37 +0000)] 
Add a -N --renew option to renew any existing address early, similar to the
-n --rebind option. However, configuration is not reloaded.

Fixes [6cf818eeab].

10 years agoMake socket init happen earlier as we need it for dump leases.
Roy Marples [Tue, 27 Oct 2015 12:46:48 +0000 (12:46 +0000)] 
Make socket init happen earlier as we need it for dump leases.

10 years agoFix printf m test.
Roy Marples [Tue, 27 Oct 2015 10:35:10 +0000 (10:35 +0000)] 
Fix printf m test.

10 years agoFix DHCP INFORM on non IN_IFF_* systems.
Roy Marples [Mon, 26 Oct 2015 23:16:35 +0000 (23:16 +0000)] 
Fix DHCP INFORM on non IN_IFF_* systems.

10 years agoFix DHCP INFORM.
Roy Marples [Mon, 26 Oct 2015 18:40:09 +0000 (18:40 +0000)] 
Fix DHCP INFORM.

10 years agoDon't check link state if not instruted to before working out if we can
Roy Marples [Mon, 26 Oct 2015 15:55:10 +0000 (15:55 +0000)] 
Don't check link state if not instruted to before working out if we can
fork early or not.
Fixes [74061fd3d3].

10 years agoLooks like NetBSD will never support printf %m so remove the commented out check.
Roy Marples [Mon, 26 Oct 2015 11:18:01 +0000 (11:18 +0000)] 
Looks like NetBSD will never support printf %m so remove the commented out check.

10 years agoOnly use GCC pragma is GCC is 4.6 or newer for push/pop support.
Roy Marples [Mon, 26 Oct 2015 10:47:33 +0000 (10:47 +0000)] 
Only use GCC pragma is GCC is 4.6 or newer for push/pop support.

10 years agoWorkaround NetBSD's buggy gcc syslog/printf format infinite loop by disabling a diagn...
Roy Marples [Mon, 26 Oct 2015 10:36:19 +0000 (10:36 +0000)] 
Workaround NetBSD's buggy gcc syslog/printf format infinite loop by disabling a diagnostic.
See the comment in the code for rationale.

10 years agoMark our logger function as sysloglike because we enjoy using %m in the format.
Roy Marples [Mon, 26 Oct 2015 10:25:00 +0000 (10:25 +0000)] 
Mark our logger function as sysloglike because we enjoy using %m in the format.
If there is no compiler support for it, fallback to printflike.
Correct some whitespace while here.

10 years agoRemove _dead macro and swap printflike position.
Roy Marples [Fri, 23 Oct 2015 20:48:20 +0000 (20:48 +0000)] 
Remove _dead macro and swap printflike position.

10 years agoFix prior accidental commit:-
Roy Marples [Fri, 23 Oct 2015 20:32:56 +0000 (20:32 +0000)] 
Fix prior accidental commit:-
NetBSD doesn't support printf %m yet
Remove logger error debug.

10 years agoRevert prior and add note why we use strerror().
Roy Marples [Fri, 23 Oct 2015 20:28:53 +0000 (20:28 +0000)] 
Revert prior and add note why we use strerror().

10 years agoUse strerror_r as strerror is not thread safe.
Roy Marples [Fri, 23 Oct 2015 16:04:25 +0000 (16:04 +0000)] 
Use strerror_r as strerror is not thread safe.

10 years agoIntroduce the optional option type, which allows embedded options to be
Roy Marples [Mon, 19 Oct 2015 09:19:45 +0000 (09:19 +0000)] 
Introduce the optional option type, which allows embedded options to be
optional. A good example of this is the Client FQDN string in the DHCP
Client FQDN option as a NULL value indicates the server has no idea
what the FQDN should be.

10 years agoImprove the logic when failing to lock the pidfile.
Roy Marples [Fri, 16 Oct 2015 10:33:48 +0000 (10:33 +0000)] 
Improve the logic when failing to lock the pidfile.

10 years agoChange configure test for IFLA_AF_SPEC to IFLA_INET6_ADDR_GEN_MODE.
Roy Marples [Wed, 14 Oct 2015 23:04:21 +0000 (23:04 +0000)] 
Change configure test for IFLA_AF_SPEC to IFLA_INET6_ADDR_GEN_MODE.
Fixes [1b15a20f7f].