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

10 years agoIf dhcpcd does not know the DHCPv6 status code, report it as an unknown
Roy Marples [Wed, 30 Sep 2015 10:08:29 +0000 (10:08 +0000)] 
If dhcpcd does not know the DHCPv6 status code, report it as an unknown
code instead of a blank string.

10 years agoAdd status code 6, No Prefix Available as a status code to report.
Roy Marples [Wed, 30 Sep 2015 09:49:06 +0000 (09:49 +0000)] 
Add status code 6, No Prefix Available as a status code to report.

10 years agoBump date for previous
Roy Marples [Wed, 30 Sep 2015 09:02:40 +0000 (09:02 +0000)] 
Bump date for previous

10 years agoAdd an option to enable DHCPv6 Information Request without the need
Roy Marples [Wed, 30 Sep 2015 09:02:13 +0000 (09:02 +0000)] 
Add an option to enable DHCPv6 Information Request without the need
for dhcpcd to recieve an IPv6 Router Advertisement with the Other
Configuration bit set.

10 years agoCorrect anohter Prefix Delegation sizing issue.
Roy Marples [Tue, 22 Sep 2015 08:42:56 +0000 (08:42 +0000)] 
Correct anohter Prefix Delegation sizing issue.

10 years agoCorrest size allocation for prefix delegation, thanks to Jade.
Roy Marples [Tue, 22 Sep 2015 08:12:30 +0000 (08:12 +0000)] 
Correst size allocation for prefix delegation, thanks to Jade.

10 years agoFix TEST for IPv4LL.
Roy Marples [Sat, 19 Sep 2015 16:43:12 +0000 (16:43 +0000)] 
Fix TEST for IPv4LL.

10 years agoFix test mode by checking for an IPv4LL address
Roy Marples [Sat, 19 Sep 2015 16:31:43 +0000 (16:31 +0000)] 
Fix test mode by checking for an IPv4LL address

10 years agoAllow -p to work with -x on an already running process started without -p.
Roy Marples [Tue, 15 Sep 2015 21:37:36 +0000 (21:37 +0000)] 
Allow -p to work with -x on an already running process started without -p.

10 years agoFix moving a lease from one interface to another.
Roy Marples [Tue, 15 Sep 2015 13:37:44 +0000 (13:37 +0000)] 
Fix moving a lease from one interface to another.

10 years agoSome BSD's require the pid explicitly set on route messages.
Roy Marples [Tue, 15 Sep 2015 13:37:25 +0000 (13:37 +0000)] 
Some BSD's require the pid explicitly set on route messages.

10 years agoChange IPv6 routes when MTU differs as well.
Roy Marples [Tue, 15 Sep 2015 11:03:31 +0000 (11:03 +0000)] 
Change IPv6 routes when MTU differs as well.

10 years agoRationalise test order.
Roy Marples [Tue, 15 Sep 2015 11:01:26 +0000 (11:01 +0000)] 
Rationalise test order.

10 years agoFix mandoc lintian error, thanks to JS Junior.
Roy Marples [Tue, 15 Sep 2015 10:17:01 +0000 (10:17 +0000)] 
Fix mandoc lintian error, thanks to JS Junior.

10 years agoFix compile on kFreeBSD thanks to JS Junior.
Roy Marples [Tue, 15 Sep 2015 10:13:53 +0000 (10:13 +0000)] 
Fix compile on kFreeBSD thanks to JS Junior.

10 years agoAdd an assert here as it's currently failing when moving a lease from one interface...
Roy Marples [Sun, 13 Sep 2015 09:32:20 +0000 (09:32 +0000)] 
Add an assert here as it's currently failing when moving a lease from one interface to another.

10 years agoAdd a note about OpenBSD always adding it's own lladdr
Roy Marples [Sun, 13 Sep 2015 08:14:26 +0000 (08:14 +0000)] 
Add a note about OpenBSD always adding it's own lladdr

10 years agoChange the BSD IPv6 interface setup order to ensure we have a better chance of eensur...
Roy Marples [Sun, 13 Sep 2015 07:46:01 +0000 (07:46 +0000)] 
Change the BSD IPv6 interface setup order to ensure we have a better chance of eensuring any LLADDR we add doesn't cause a duplicate by the kernel.

10 years agoFix compile on FreeBSD.
Roy Marples [Sat, 12 Sep 2015 20:51:56 +0000 (20:51 +0000)] 
Fix compile on FreeBSD.

10 years agoMake CAN_ADD_LLADDR work on BSD.
Roy Marples [Sat, 12 Sep 2015 20:37:01 +0000 (20:37 +0000)] 
Make CAN_ADD_LLADDR work on BSD.

10 years agoIf we can toggle the automatic creation of the lladdr by the kernel then
Roy Marples [Sat, 12 Sep 2015 20:21:02 +0000 (20:21 +0000)] 
If we can toggle the automatic creation of the lladdr by the kernel then
we can remove the lladdr at carrier down and only add it at carrier up.
This allows us to ensure the lladdr undergoes DaD and we can randomise it
per SSID if we need to.

10 years agoWe need to check kernel IPv6 setup for the interface if doing any IPv6, not just RS.
Roy Marples [Sat, 12 Sep 2015 20:19:31 +0000 (20:19 +0000)] 
We need to check kernel IPv6 setup for the interface if doing any IPv6, not just RS.

10 years agoRemove some unreachable code.
Roy Marples [Sat, 12 Sep 2015 13:53:58 +0000 (13:53 +0000)] 
Remove some unreachable code.

10 years agoFix compile on Bitrig
Roy Marples [Sat, 12 Sep 2015 13:14:27 +0000 (13:14 +0000)] 
Fix compile on Bitrig

10 years agoRemove correct configure test file
Roy Marples [Sat, 12 Sep 2015 12:28:01 +0000 (12:28 +0000)] 
Remove correct configure test file

10 years agoTest for error condition rather than a success of 0 when setting routes.
Roy Marples [Fri, 11 Sep 2015 18:22:35 +0000 (18:22 +0000)] 
Test for error condition rather than a success of 0 when setting routes.

10 years agoRemove the custom SixRD decode function and replace with a generic
Roy Marples [Thu, 10 Sep 2015 08:41:37 +0000 (08:41 +0000)] 
Remove the custom SixRD decode function and replace with a generic
definition.
This does mean any 3rd party hook scripts using this will need to be changed.

10 years agoAdd IPv4 address selection from route code so platform handlers don't
Roy Marples [Thu, 10 Sep 2015 08:32:37 +0000 (08:32 +0000)] 
Add IPv4 address selection from route code so platform handlers don't
have to work it out.

10 years agoFix prior for IPv6 old routes.
Roy Marples [Wed, 9 Sep 2015 08:50:47 +0000 (08:50 +0000)] 
Fix prior for IPv6 old routes.

10 years agoWhen deleting an old route and it doesn't have an interface then use
Roy Marples [Tue, 8 Sep 2015 16:29:02 +0000 (16:29 +0000)] 
When deleting an old route and it doesn't have an interface then use
the interface of the new route for context.

10 years agoFix the REBIND reason.
Roy Marples [Tue, 8 Sep 2015 13:14:22 +0000 (13:14 +0000)] 
Fix the REBIND reason.

10 years agoRework arp_free and arp_free_but to share a common function.
Roy Marples [Tue, 8 Sep 2015 12:23:19 +0000 (12:23 +0000)] 
Rework arp_free and arp_free_but to share a common function.
Less code and works around a clang static analyzer bug.

10 years agoRevert this part of prior patch.
Roy Marples [Tue, 8 Sep 2015 12:22:38 +0000 (12:22 +0000)] 
Revert this part of prior patch.

10 years agoifp may not be set, but ctx will be.
Roy Marples [Tue, 8 Sep 2015 10:32:45 +0000 (10:32 +0000)] 
ifp may not be set, but ctx will be.

10 years agoMove defines checks after all includes to make Android happy.
Roy Marples [Tue, 8 Sep 2015 08:33:52 +0000 (08:33 +0000)] 
Move defines checks after all includes to make Android happy.

10 years agoI was wrong about Linux allowing userland to mark addresses as temporary,
Roy Marples [Mon, 7 Sep 2015 18:14:31 +0000 (18:14 +0000)] 
I was wrong about Linux allowing userland to mark addresses as temporary,
this just does not work.
Instead we can only mark addresses such that the kernel will generate and
manage temporary address from.
This means that that a large chunk of the temporary address management
code can be disabled on Linux, resulting in a smaller binary.
Fixes [8f4197ed4d] and [f40b0f329a].

10 years agoInstead of forcing a #define for IFLA_AF_SPEC, add a configure check to
Roy Marples [Mon, 7 Sep 2015 16:12:57 +0000 (16:12 +0000)] 
Instead of forcing a #define for IFLA_AF_SPEC, add a configure check to
ensure it exists.

10 years agoIf we failed to release, we may not have a state when finishing the release.
Roy Marples [Mon, 7 Sep 2015 14:45:44 +0000 (14:45 +0000)] 
If we failed to release, we may not have a state when finishing the release.

10 years agoAdd support for Chrony, fixes [03943daba7].
Roy Marples [Mon, 7 Sep 2015 10:58:04 +0000 (10:58 +0000)] 
Add support for Chrony, fixes [03943daba7].

10 years agoRelease dhcpcd-6.9.3 v6.9.3
Roy Marples [Fri, 4 Sep 2015 11:41:18 +0000 (11:41 +0000)] 
Release dhcpcd-6.9.3

10 years agoWhen adding a static address on non IN_IFF_* systems we should still ARP
Roy Marples [Thu, 3 Sep 2015 15:06:43 +0000 (15:06 +0000)] 
When adding a static address on non IN_IFF_* systems we should still ARP
check.

10 years agoFix compile on Linux
Roy Marples [Thu, 3 Sep 2015 14:42:16 +0000 (14:42 +0000)] 
Fix compile on Linux

10 years agoFix rebinding statically assinged IPv4 addresses.
Roy Marples [Thu, 3 Sep 2015 12:54:37 +0000 (12:54 +0000)] 
Fix rebinding statically assinged IPv4 addresses.

10 years agoNow that we set MTU for routes instead of using a hook script,
Roy Marples [Mon, 31 Aug 2015 10:26:49 +0000 (10:26 +0000)] 
Now that we set MTU for routes instead of using a hook script,
we need to read static interface_mtu (or static mtu) and use that if
available.

10 years agoTest prefix as well as variable name when setting static variables.
Roy Marples [Mon, 31 Aug 2015 09:06:37 +0000 (09:06 +0000)] 
Test prefix as well as variable name when setting static variables.
Fixes [e0893837e6].

While here, simplify a condition.

10 years agoFix compile on systems lacking SOCK_CLOEXEC.
Roy Marples [Sun, 23 Aug 2015 16:12:18 +0000 (16:12 +0000)] 
Fix compile on systems lacking SOCK_CLOEXEC.

10 years agoSilence a bogus gcc warning
Roy Marples [Sat, 22 Aug 2015 12:52:08 +0000 (12:52 +0000)] 
Silence a bogus gcc warning

10 years agoRemove unused variable.
Roy Marples [Fri, 21 Aug 2015 13:23:40 +0000 (13:23 +0000)] 
Remove unused variable.

10 years agoFix compile on OpenBSD v6.9.2
Roy Marples [Fri, 21 Aug 2015 10:11:59 +0000 (10:11 +0000)] 
Fix compile on OpenBSD