]> git.ipfire.org Git - thirdparty/dhcpcd.git/log
thirdparty/dhcpcd.git
11 years agoFix compile and warnings on BSD.
Roy Marples [Wed, 10 Sep 2014 02:02:21 +0000 (02:02 +0000)] 
Fix compile and warnings on BSD.

11 years agoUse the nl80211 interface on Linux to get the wireless SSID.
Roy Marples [Wed, 10 Sep 2014 01:46:58 +0000 (01:46 +0000)] 
Use the nl80211 interface on Linux to get the wireless SSID.
If this is not found in the system headers, fall back to assuming WEXT.
This has been done because the WEXT module has been marked as deprecated
for a while now and I'm getting bored of people asking me why their
wireless wasn't working. Bloated dhcpcd by another 600 bytes as a result.

11 years agoDocument every variable set for dhcpcd-run-hooks(8)
Roy Marples [Tue, 9 Sep 2014 12:59:08 +0000 (12:59 +0000)] 
Document every variable set for dhcpcd-run-hooks(8)

11 years agoPass SVCNAME from enviromment to hooks so that a service hook
Roy Marples [Tue, 9 Sep 2014 08:22:10 +0000 (08:22 +0000)] 
Pass SVCNAME from enviromment to hooks so that a service hook
can know it's name (may not be dhcpcd).

11 years agoAlways define IFLA_INET6_ADDR_GEN_MODE because linux defines it as an
Roy Marples [Mon, 8 Sep 2014 13:58:18 +0000 (13:58 +0000)] 
Always define IFLA_INET6_ADDR_GEN_MODE because linux defines it as an
enum only, thus we have no way of knowing if it exists or not in an

11 years agoAdd variables if_oneup and if_ipwaited so hook scripts know the overall state of...
Roy Marples [Sun, 7 Sep 2014 19:03:41 +0000 (19:03 +0000)] 
Add variables if_oneup and if_ipwaited so hook scripts know the overall state of dhcpcd better.

11 years agoAdd needed includes for some systems.
Roy Marples [Sun, 7 Sep 2014 18:33:30 +0000 (18:33 +0000)] 
Add needed includes for some systems.

11 years agoSplit arc4random_uniform into it's own compat function and add
Roy Marples [Sun, 7 Sep 2014 17:24:07 +0000 (17:24 +0000)] 
Split arc4random_uniform into it's own compat function and add
it's proper copyright.
Add a new test for it to configure so that we can use the
uclibc arc4random function and our compat arc4random_uniform function.

11 years agoAdd a sample controlgroup directive to dhcpcd.conf to make setup easier.
Roy Marples [Fri, 5 Sep 2014 14:14:28 +0000 (14:14 +0000)] 
Add a sample controlgroup directive to dhcpcd.conf to make setup easier.

11 years agoImplement a send queue for each control fd.
Roy Marples [Fri, 5 Sep 2014 12:28:05 +0000 (12:28 +0000)] 
Implement a send queue for each control fd.
Only one call to write(2) should be performed for each POLLOUT check
via poll(2) so we should never see EAGAIN when writing to control
sockets ever again.
Each fd queue is limited to 100 entries so we don't OOM with badly
written control subscribers.

11 years agoOnly send DHCPv6 and RA to control sockets when DAD has been completed.
Roy Marples [Thu, 4 Sep 2014 19:55:37 +0000 (19:55 +0000)] 
Only send DHCPv6 and RA to control sockets when DAD has been completed.

11 years agoFix compile for dev manager.
Roy Marples [Thu, 4 Sep 2014 19:32:25 +0000 (19:32 +0000)] 
Fix compile for dev manager.

11 years agoAdd a write callback to eloop so we know when we can write to the socket.
Roy Marples [Thu, 4 Sep 2014 19:30:47 +0000 (19:30 +0000)] 
Add a write callback to eloop so we know when we can write to the socket.
This seems to be important for our control socket as sometimes, we fail to
write with EAGAIN and dhcpcd should not block on users of this socket.

11 years ago--getinterfaces no longer supports an option interface list.
Roy Marples [Thu, 4 Sep 2014 16:23:36 +0000 (16:23 +0000)] 
--getinterfaces no longer supports an option interface list.

11 years agoFix the number of interfaces we actually send
Roy Marples [Tue, 2 Sep 2014 23:41:52 +0000 (23:41 +0000)] 
Fix the number of interfaces we actually send

11 years agoClose the sockets after shutting them down.
Roy Marples [Tue, 2 Sep 2014 13:53:16 +0000 (13:53 +0000)] 
Close the sockets after shutting them down.

11 years agoDon't log an interface for the global error.
Roy Marples [Tue, 2 Sep 2014 07:41:15 +0000 (07:41 +0000)] 
Don't log an interface for the global error.

11 years agoMinor optimisation.
Roy Marples [Mon, 1 Sep 2014 16:39:58 +0000 (16:39 +0000)] 
Minor optimisation.

11 years agoAs we listen and consume bootpc on the global socket, open and close
Roy Marples [Mon, 1 Sep 2014 16:35:43 +0000 (16:35 +0000)] 
As we listen and consume bootpc on the global socket, open and close
the ip specific socket when sending unicast messages instead of
just keeping it open.

11 years agoWhitespace
Roy Marples [Wed, 20 Aug 2014 09:20:49 +0000 (09:20 +0000)] 
Whitespace

11 years agoEnsure domain label length and jump values fit inside the given data.
Roy Marples [Wed, 20 Aug 2014 09:19:06 +0000 (09:19 +0000)] 
Ensure domain label length and jump values fit inside the given data.
Thanks to Tobias Stoeckmann.

11 years agoCheck that we have enough bytes to read the netmask and router
Roy Marples [Tue, 19 Aug 2014 08:42:28 +0000 (08:42 +0000)] 
Check that we have enough bytes to read the netmask and router
from the classless static routes option.
Thanks to Tobias Stoeckmann.

11 years agoSanitize input via the control socket a little better.
Roy Marples [Wed, 13 Aug 2014 23:31:23 +0000 (23:31 +0000)] 
Sanitize input via the control socket a little better.
Thanks to Tobias Stoeckmann.

11 years agoSet IFLA_INET6_ADDR_GEN_MODE to IN6_ADDR_GEN_MODE_NONE
Roy Marples [Mon, 11 Aug 2014 20:52:39 +0000 (20:52 +0000)] 
Set IFLA_INET6_ADDR_GEN_MODE to IN6_ADDR_GEN_MODE_NONE
for supporting kernels to avoid potentially duplicate
IPv6 link-local addresses.

11 years agoOptimize auth_len a little.
Roy Marples [Thu, 7 Aug 2014 09:54:19 +0000 (09:54 +0000)] 
Optimize auth_len a little.

11 years agoImprove error when the authentication token cannot be found.
Roy Marples [Thu, 7 Aug 2014 09:43:18 +0000 (09:43 +0000)] 
Improve error when the authentication token cannot be found.
Improve documentation for setting up authentication.

11 years agoCheck snprintf doesn't overflow in dhcp_vendor and that a -1
Roy Marples [Tue, 5 Aug 2014 17:03:04 +0000 (17:03 +0000)] 
Check snprintf doesn't overflow in dhcp_vendor and that a -1
return is correctly handled.

Thanks to Tobias Stoeckmann.

11 years agoClose the fd if bind(3) fails and work again with older Linux kernels for
Roy Marples [Fri, 1 Aug 2014 23:19:55 +0000 (23:19 +0000)] 
Close the fd if bind(3) fails and work again with older Linux kernels for
working out netlink sizes.

Thanks to Tobias Stoeckmann.

11 years agoFix dependency and test targets
Roy Marples [Thu, 31 Jul 2014 00:57:47 +0000 (00:57 +0000)] 
Fix dependency and test targets

11 years agoRelease dhcpcd-6.4.3 v6.4.3
Roy Marples [Wed, 30 Jul 2014 15:13:12 +0000 (15:13 +0000)] 
Release dhcpcd-6.4.3

11 years agoFix import so that matching system vs local headers are not imported.
Roy Marples [Wed, 30 Jul 2014 10:58:20 +0000 (10:58 +0000)] 
Fix import so that matching system vs local headers are not imported.

11 years agoRemove some unused variables
Roy Marples [Wed, 30 Jul 2014 10:03:14 +0000 (10:03 +0000)] 
Remove some unused variables

11 years agoWarn about exceeding IDGEN_RETRIES when a stable private address cannot be obtained.
Roy Marples [Wed, 30 Jul 2014 09:55:32 +0000 (09:55 +0000)] 
Warn about exceeding IDGEN_RETRIES when a stable private address cannot be obtained.

11 years agoFix the import to work on Linux as well.
Roy Marples [Wed, 30 Jul 2014 09:46:33 +0000 (09:46 +0000)] 
Fix the import to work on Linux as well.

11 years agoOnly bits 1 and 2 are used in the DHCP overload option, so when we encounter
Roy Marples [Wed, 30 Jul 2014 08:58:42 +0000 (08:58 +0000)] 
Only bits 1 and 2 are used in the DHCP overload option, so when we encounter
the option set the last bit as well to ensure servername and bootfile are
only checked once as their check unsets bits 1 and 2.

Thanks to Tobias Stoeckmann.

11 years agoFix compile on NetBSD-6
Roy Marples [Mon, 28 Jul 2014 09:19:27 +0000 (09:19 +0000)] 
Fix compile on NetBSD-6

11 years agoTest no useable IA in each lease validation.
Roy Marples [Mon, 28 Jul 2014 09:15:04 +0000 (09:15 +0000)] 
Test no useable IA in each lease validation.

11 years agoWith an unknown link, test carrier manually and loop 100ms.
Roy Marples [Fri, 25 Jul 2014 12:49:53 +0000 (12:49 +0000)] 
With an unknown link, test carrier manually and loop 100ms.

11 years agoWhen starting an interface and the carrier is UNKNOWN, wait 100ms before trying to...
Roy Marples [Tue, 22 Jul 2014 18:03:34 +0000 (18:03 +0000)] 
When starting an interface and the carrier is UNKNOWN, wait 100ms before trying to start again.
UNKNOWN should only be reported for BSD systems where the carrier medium reports an error or is
not valid. In this case the carrier is only UP when IFF_RUNNING is set.

11 years agoUse realloc instead of free/malloc.
Roy Marples [Mon, 21 Jul 2014 19:08:22 +0000 (19:08 +0000)] 
Use realloc instead of free/malloc.

11 years agoEnsure that a given buffer is at least BUFSIZ.
Roy Marples [Mon, 21 Jul 2014 19:05:32 +0000 (19:05 +0000)] 
Ensure that a given buffer is at least BUFSIZ.

11 years agoMove DHCP into it's own eloop queue away from the link queue.
Roy Marples [Sat, 19 Jul 2014 12:09:43 +0000 (12:09 +0000)] 
Move DHCP into it's own eloop queue away from the link queue.

11 years agoJust do length
Roy Marples [Thu, 17 Jul 2014 08:21:07 +0000 (08:21 +0000)] 
Just do length

11 years agoCorrect DHCPv6 Prefix Delegation option decoding
Roy Marples [Thu, 17 Jul 2014 08:19:53 +0000 (08:19 +0000)] 
Correct DHCPv6 Prefix Delegation option decoding

11 years agoTypos
Roy Marples [Mon, 14 Jul 2014 15:43:00 +0000 (15:43 +0000)] 
Typos

11 years agoFix import v6.4.2
Roy Marples [Mon, 14 Jul 2014 13:58:24 +0000 (13:58 +0000)] 
Fix import

11 years agoRelease dhcpcd-6.4.2
Roy Marples [Mon, 14 Jul 2014 13:43:33 +0000 (13:43 +0000)] 
Release dhcpcd-6.4.2

11 years agoFix gcc build errors.
Roy Marples [Mon, 14 Jul 2014 12:55:19 +0000 (12:55 +0000)] 
Fix gcc build errors.

11 years agoRelease dhcpcd-6.4.1 v6.4.1
Roy Marples [Mon, 14 Jul 2014 11:30:15 +0000 (11:30 +0000)] 
Release dhcpcd-6.4.1

11 years agoUse __NetBSD_Version__ macro instead of __NetBSD_Prereq__
Roy Marples [Sun, 13 Jul 2014 22:01:01 +0000 (22:01 +0000)] 
Use __NetBSD_Version__ macro instead of __NetBSD_Prereq__

11 years agoReduce use of s6_addr
Roy Marples [Fri, 11 Jul 2014 13:24:29 +0000 (13:24 +0000)] 
Reduce use of s6_addr

11 years agoUse structures to better bescribe IA and PD options.
Roy Marples [Fri, 11 Jul 2014 10:13:52 +0000 (10:13 +0000)] 
Use structures to better bescribe IA and PD options.

11 years agoEnsure we have enough data for prefix exclude length in the option.
Roy Marples [Wed, 9 Jul 2014 10:51:20 +0000 (10:51 +0000)] 
Ensure we have enough data for prefix exclude length in the option.
We don't request the excluded prefix itself, just what it is.
Ensure the excluded prefix is not applied to downstream interfaces.
Hopefully fixes [ac7063e671].

11 years agoOnly create a pseudo interface for PD when we have other IA types as well.
Roy Marples [Wed, 9 Jul 2014 04:41:23 +0000 (04:41 +0000)] 
Only create a pseudo interface for PD when we have other IA types as well.

11 years agoEnsure iaid was previously set before testing equality.
Roy Marples [Wed, 9 Jul 2014 04:40:53 +0000 (04:40 +0000)] 
Ensure iaid was previously set before testing equality.

11 years agoPseudo interfaces also have an address list, do loop through all of them.
Roy Marples [Tue, 8 Jul 2014 19:29:45 +0000 (19:29 +0000)] 
Pseudo interfaces also have an address list, do loop through all of them.
Describe reject routes better.

11 years agoFix delegated prefix handling and improve DAD checking.
Roy Marples [Tue, 8 Jul 2014 19:28:52 +0000 (19:28 +0000)] 
Fix delegated prefix handling and improve DAD checking.

11 years agoifclass= separates psuedo interfaces to avoid option collision.
Roy Marples [Tue, 8 Jul 2014 19:25:21 +0000 (19:25 +0000)] 
ifclass= separates psuedo interfaces to avoid option collision.

11 years agoTypo
Roy Marples [Tue, 8 Jul 2014 08:41:08 +0000 (08:41 +0000)] 
Typo

11 years agoHandle truncated saved leases.
Roy Marples [Tue, 8 Jul 2014 07:56:39 +0000 (07:56 +0000)] 
Handle truncated saved leases.
Fixes [7704dc4ae0]

11 years agoFix a null reference
Roy Marples [Mon, 7 Jul 2014 18:10:18 +0000 (18:10 +0000)] 
Fix a null reference

11 years agoRemove forced error
Roy Marples [Mon, 7 Jul 2014 17:45:36 +0000 (17:45 +0000)] 
Remove forced error

11 years agoDon't report DUID or IAID or the pseudo interface.
Roy Marples [Mon, 7 Jul 2014 17:23:16 +0000 (17:23 +0000)] 
Don't report DUID or IAID or the pseudo interface.

11 years agoFix some memory error with prior patch.
Roy Marples [Mon, 7 Jul 2014 16:42:30 +0000 (16:42 +0000)] 
Fix some memory error with prior patch.

11 years agoTypo
Roy Marples [Mon, 7 Jul 2014 14:44:06 +0000 (14:44 +0000)] 
Typo

11 years agoWhen requesting a IA_PD and another IA type, create a psuedo interface
Roy Marples [Mon, 7 Jul 2014 14:41:18 +0000 (14:41 +0000)] 
When requesting a IA_PD and another IA type, create a psuedo interface
to handle the IA_PD.
ia_pd_mix config option disables this and mixes IA_PD in the single session as
per draft-ietf-dhc-dhcpv6-stateful-issues-06.

11 years agoThere are no pd's in the config if we're not dealing with them.
Roy Marples [Mon, 7 Jul 2014 10:01:24 +0000 (10:01 +0000)] 
There are no pd's in the config if we're not dealing with them.

11 years agoFix const
Roy Marples [Mon, 7 Jul 2014 09:36:17 +0000 (09:36 +0000)] 
Fix const

11 years agoFix Prefix Exclude encoding/decoding.
Roy Marples [Mon, 7 Jul 2014 09:21:35 +0000 (09:21 +0000)] 
Fix Prefix Exclude encoding/decoding.

11 years agoWe should use NBBY rather than a magic 8.
Roy Marples [Sat, 5 Jul 2014 19:47:22 +0000 (19:47 +0000)] 
We should use NBBY rather than a magic 8.

11 years agoFix fallback test
Roy Marples [Sat, 5 Jul 2014 15:40:01 +0000 (15:40 +0000)] 
Fix fallback test

11 years agoRemove dead store.
Roy Marples [Fri, 4 Jul 2014 20:46:24 +0000 (20:46 +0000)] 
Remove dead store.

11 years agoSpecify the Prefix Exclude option.
Roy Marples [Fri, 4 Jul 2014 20:20:48 +0000 (20:20 +0000)] 
Specify the Prefix Exclude option.

11 years agoSupport RFC6603 to fix [ac7063e671].
Roy Marples [Fri, 4 Jul 2014 19:44:15 +0000 (19:44 +0000)] 
Support RFC6603 to fix [ac7063e671].

11 years agoAdd --pfxdlgonly and --nopfxdlg options to spawn separate dhcpcd instances
Roy Marples [Fri, 4 Jul 2014 11:53:56 +0000 (11:53 +0000)] 
Add --pfxdlgonly and --nopfxdlg options to spawn separate dhcpcd instances
to allow for RFC conformance when you need to configure a Prefix Delegation
and a Normal Address for DHCPv6 on the same interface.

11 years agoPrint user defined options via -V
Roy Marples [Thu, 3 Jul 2014 23:11:00 +0000 (23:11 +0000)] 
Print user defined options via -V

11 years agoAccept \n as end of command on the control interface.
Roy Marples [Thu, 3 Jul 2014 14:23:32 +0000 (14:23 +0000)] 
Accept \n as end of command on the control interface.

11 years agoFix a potential segfault when reloading configurations.
Roy Marples [Thu, 3 Jul 2014 10:07:35 +0000 (10:07 +0000)] 
Fix a potential segfault when reloading configurations.
Thanks to Eelco Dolstra for the patch.

11 years agoFix dumping DHCPv6 leases. This broke when we ignored IAIDs we didn't ask for.
Roy Marples [Thu, 3 Jul 2014 09:47:42 +0000 (09:47 +0000)] 
Fix dumping DHCPv6 leases. This broke when we ignored IAIDs we didn't ask for.

11 years agoFix defining new options in dhcpcd.conf and requesting them.
Roy Marples [Wed, 2 Jul 2014 18:59:19 +0000 (18:59 +0000)] 
Fix defining new options in dhcpcd.conf and requesting them.

11 years agoFix compile.
Roy Marples [Wed, 2 Jul 2014 13:24:55 +0000 (13:24 +0000)] 
Fix compile.

11 years agoStop restoring kernel flags to their state before dhcpcd ran.
Roy Marples [Wed, 2 Jul 2014 13:15:18 +0000 (13:15 +0000)] 
Stop restoring kernel flags to their state before dhcpcd ran.
As multiple dhcpcd daemons could be in use to facilitate separate sessions
per DHCPv6 IA resetting them at exist could break the others.

11 years agoRef RFC7217
Roy Marples [Wed, 2 Jul 2014 12:57:50 +0000 (12:57 +0000)] 
Ref RFC7217

11 years agoFix some more compiler errors
Roy Marples [Wed, 2 Jul 2014 11:42:08 +0000 (11:42 +0000)] 
Fix some more compiler errors

11 years agoFix a compile error
Roy Marples [Wed, 2 Jul 2014 11:20:04 +0000 (11:20 +0000)] 
Fix a compile error

11 years agoRemove dead store.
Roy Marples [Wed, 2 Jul 2014 11:10:46 +0000 (11:10 +0000)] 
Remove dead store.

11 years agoMinor optimisation
Roy Marples [Wed, 2 Jul 2014 10:57:18 +0000 (10:57 +0000)] 
Minor optimisation

11 years agoNo point in delaying a static configuration
Roy Marples [Wed, 2 Jul 2014 10:51:31 +0000 (10:51 +0000)] 
No point in delaying a static configuration

11 years agoAdd a comment to describe why we deny the ability to assign prefixes
Roy Marples [Wed, 2 Jul 2014 08:23:28 +0000 (08:23 +0000)] 
Add a comment to describe why we deny the ability to assign prefixes
to the requesting interface [ac7063e671].

11 years agoSet addr to zero if unset.
Roy Marples [Tue, 1 Jul 2014 21:14:59 +0000 (21:14 +0000)] 
Set addr to zero if unset.

11 years agoFix link handling where kernel reported flags in LINK_UP may not be valid
Roy Marples [Tue, 1 Jul 2014 21:06:07 +0000 (21:06 +0000)] 
Fix link handling where kernel reported flags in LINK_UP may not be valid
when we actually process them.

11 years agoSupport http://datatracker.ietf.org/doc/draft-ietf-dhc-dhcpv6-stateful-issues.
Roy Marples [Tue, 1 Jul 2014 20:34:19 +0000 (20:34 +0000)] 
Support http://datatracker.ietf.org/doc/draft-ietf-dhc-dhcpv6-stateful-issues.
It's not an RFC yet, but it seems it's needed for Prefix Delegation to work
on ComCast where a IA_NA is required as well.

11 years agoStart the correct interface reference for added devices.
Roy Marples [Mon, 30 Jun 2014 15:55:28 +0000 (15:55 +0000)] 
Start the correct interface reference for added devices.

11 years agoImprove startup with regards to carrier checking and adding a link-local
Roy Marples [Mon, 30 Jun 2014 15:43:58 +0000 (15:43 +0000)] 
Improve startup with regards to carrier checking and adding a link-local
IPv6 address.

11 years agoDon't log errors about restoring RA for departed interfaces.
Roy Marples [Mon, 30 Jun 2014 12:08:00 +0000 (12:08 +0000)] 
Don't log errors about restoring RA for departed interfaces.

11 years agoAdd debugging messages for interface arrival/departure.
Roy Marples [Mon, 30 Jun 2014 11:28:14 +0000 (11:28 +0000)] 
Add debugging messages for interface arrival/departure.
Only init state and run preinit for new interfaces.

11 years agoFix compile issue.
Roy Marples [Mon, 30 Jun 2014 11:08:19 +0000 (11:08 +0000)] 
Fix compile issue.

11 years agoRevert [26bc10be24] as some compile can't output to /dev/null.
Roy Marples [Mon, 30 Jun 2014 09:44:07 +0000 (09:44 +0000)] 
Revert [26bc10be24] as some compile can't output to /dev/null.

11 years agoFix gcc unused value error
Roy Marples [Sun, 29 Jun 2014 02:58:19 +0000 (02:58 +0000)] 
Fix gcc unused value error

11 years agoAdd the ability to dump DHCPv6 leases.
Roy Marples [Sun, 22 Jun 2014 13:05:05 +0000 (13:05 +0000)] 
Add the ability to dump DHCPv6 leases.
Control DHCPv4 vs DHCPv6 dumping via the family option.