]> git.ipfire.org Git - thirdparty/dhcpcd.git/log
thirdparty/dhcpcd.git
10 years agoExtract the route MTU for Linux.
Roy Marples [Tue, 28 Jul 2015 21:32:13 +0000 (21:32 +0000)] 
Extract the route MTU for Linux.

10 years agoMove route state into it's own flag.
Roy Marples [Tue, 28 Jul 2015 13:58:31 +0000 (13:58 +0000)] 
Move route state into it's own flag.
Instead of setting the interface MTU directly, set the MTU for each of the
routes derived from the DHCP message in the same way we do for IPv6 RA.

10 years agoOnly apply interface MTU on DHCP messages, or static IPv4 configuration.
Roy Marples [Mon, 27 Jul 2015 09:31:35 +0000 (09:31 +0000)] 
Only apply interface MTU on DHCP messages, or static IPv4 configuration.

10 years agoIgnore interface address changes we made on Linux.
Roy Marples [Sun, 26 Jul 2015 14:35:27 +0000 (14:35 +0000)] 
Ignore interface address changes we made on Linux.
Fixes [0f72e262e9].

10 years agoFree offer on drop.
Roy Marples [Fri, 24 Jul 2015 21:53:56 +0000 (21:53 +0000)] 
Free offer on drop.

10 years agoOnly read the DHCP lease when doing DHCP.
Roy Marples [Fri, 24 Jul 2015 21:51:02 +0000 (21:51 +0000)] 
Only read the DHCP lease when doing DHCP.

10 years agoWhen dropping IPv4LL state, remove the address and rebuild routes before
Roy Marples [Fri, 24 Jul 2015 20:47:08 +0000 (20:47 +0000)] 
When dropping IPv4LL state, remove the address and rebuild routes before
calling dhcpcd-run-hooks.
Ensure that the IPv4LL random state is only used when picking addresses
and the original state is restored.

10 years agoIf we only have IPv4LL addresses, add a default route to the link so that
Roy Marples [Fri, 24 Jul 2015 10:22:50 +0000 (10:22 +0000)] 
If we only have IPv4LL addresses, add a default route to the link so that
we stand a chance at communicating with non IPv4LL addresses on the same link.

10 years agoRemove un-used variable.
Roy Marples [Wed, 22 Jul 2015 12:25:54 +0000 (12:25 +0000)] 
Remove un-used variable.

10 years agoClarify the automatic mapping of DHCPv4 to DHCPv6 options.
Roy Marples [Wed, 22 Jul 2015 10:24:37 +0000 (10:24 +0000)] 
Clarify the automatic mapping of DHCPv4 to DHCPv6 options.

10 years agoWhen ending IPv4LL, only rebuild routes if we dropped an address.
Roy Marples [Wed, 22 Jul 2015 10:11:44 +0000 (10:11 +0000)] 
When ending IPv4LL, only rebuild routes if we dropped an address.

10 years agoIgnore the RA if there are no public addresses on the interface.
Roy Marples [Wed, 22 Jul 2015 10:07:39 +0000 (10:07 +0000)] 
Ignore the RA if there are no public addresses on the interface.
Fixes [f44b3b4817].

10 years agoBackout commit [f20a30175f] as the behaviour can be trigged on Linux as well.
Roy Marples [Wed, 22 Jul 2015 09:59:32 +0000 (09:59 +0000)] 
Backout commit [f20a30175f] as the behaviour can be trigged on Linux as well.

10 years agoAdd another fix for compiling on old systems.
Roy Marples [Sat, 18 Jul 2015 10:31:19 +0000 (10:31 +0000)] 
Add another fix for compiling on old systems.

10 years agoeloop itself now contains a pselect wrapper.
Roy Marples [Sat, 18 Jul 2015 10:28:50 +0000 (10:28 +0000)] 
eloop itself now contains a pselect wrapper.

10 years agoAdd a #define to compile ignoring the RA without a public address.
Roy Marples [Mon, 13 Jul 2015 19:05:33 +0000 (19:05 +0000)] 
Add a #define to compile ignoring the RA without a public address.
This is set for BSD systems at present so that working systems such as Linux
work by default as designed.
Fixes [f44b3b4817].

10 years agoAdd a noup directive to stop master mode bringing an interface up.
Roy Marples [Mon, 13 Jul 2015 17:40:54 +0000 (17:40 +0000)] 
Add a noup directive to stop master mode bringing an interface up.
Fixes [96c6bf4e5f].

10 years agoMinor optimisation.
Roy Marples [Fri, 10 Jul 2015 08:43:59 +0000 (08:43 +0000)] 
Minor optimisation.

10 years agoOnly run the IPv4LL script on drop when actually dropping an IPv4LL address.
Roy Marples [Thu, 9 Jul 2015 13:51:26 +0000 (13:51 +0000)] 
Only run the IPv4LL script on drop when actually dropping an IPv4LL address.

10 years agoRelease dhcpcd-6.9.1 v6.9.1
Roy Marples [Thu, 9 Jul 2015 09:29:43 +0000 (09:29 +0000)] 
Release dhcpcd-6.9.1

10 years agoDocument many interface assignment from a delegated prefix.
Roy Marples [Thu, 9 Jul 2015 09:27:36 +0000 (09:27 +0000)] 
Document many interface assignment from a delegated prefix.

10 years agoRemove pointless comment.
Roy Marples [Sat, 4 Jul 2015 22:09:51 +0000 (22:09 +0000)] 
Remove pointless comment.

10 years agoRefer to the domain name encoding as RFC1035 rather than the RFC for the
Roy Marples [Sat, 4 Jul 2015 13:33:24 +0000 (13:33 +0000)] 
Refer to the domain name encoding as RFC1035 rather than the RFC for the
DHCP option which first required it.

10 years agoAllow static to work for pre-existing addresses without a config.
Roy Marples [Sat, 4 Jul 2015 12:33:22 +0000 (12:33 +0000)] 
Allow static to work for pre-existing addresses without a config.

10 years agoWhen sending to an address, ensure we have a socket.
Roy Marples [Sat, 4 Jul 2015 12:13:53 +0000 (12:13 +0000)] 
When sending to an address, ensure we have a socket.

10 years agoDHCPv6 elapsed time is centiseconds, not seconds.
Roy Marples [Fri, 3 Jul 2015 23:35:56 +0000 (23:35 +0000)] 
DHCPv6 elapsed time is centiseconds, not seconds.
Start the measurement from when the first message is actually sent rather
than when DHCPv6 started.

10 years agoFix DHCPv6 elapsed time.
Roy Marples [Fri, 3 Jul 2015 22:12:37 +0000 (22:12 +0000)] 
Fix DHCPv6 elapsed time.

10 years agoCompile on OpenBSD again.
Roy Marples [Fri, 3 Jul 2015 22:00:28 +0000 (22:00 +0000)] 
Compile on OpenBSD again.

10 years agoDescribe the persistent option better with regards to exit.
Roy Marples [Fri, 3 Jul 2015 20:46:10 +0000 (20:46 +0000)] 
Describe the persistent option better with regards to exit.

10 years agoRFC2132 notes that the Vendor Class identifier option is a string.
Roy Marples [Thu, 2 Jul 2015 16:29:38 +0000 (16:29 +0000)] 
RFC2132 notes that the Vendor Class identifier option is a string.

10 years agoUpdate comment about FQDN encoding
Roy Marples [Thu, 2 Jul 2015 15:58:29 +0000 (15:58 +0000)] 
Update comment about FQDN encoding

10 years agoUse constants defined in arpa/nameser.h rather than magic numbers.
Roy Marples [Thu, 2 Jul 2015 15:51:29 +0000 (15:51 +0000)] 
Use constants defined in arpa/nameser.h rather than magic numbers.

10 years agoNote that the FDQN has to support domain encoding rather than ASCII.
Roy Marples [Thu, 2 Jul 2015 15:33:01 +0000 (15:33 +0000)] 
Note that the FDQN has to support domain encoding rather than ASCII.

10 years agoDocument why we say some RFC1035 label types are not supported.
Roy Marples [Thu, 2 Jul 2015 15:32:30 +0000 (15:32 +0000)] 
Document why we say some RFC1035 label types are not supported.

10 years agoFix testing reporting the DHCP lease.
Roy Marples [Thu, 2 Jul 2015 13:04:15 +0000 (13:04 +0000)] 
Fix testing reporting the DHCP lease.

10 years agoIf we load a saved lease we are trying to rebind, set ciaddr correctly.
Roy Marples [Wed, 1 Jul 2015 19:36:32 +0000 (19:36 +0000)] 
If we load a saved lease we are trying to rebind, set ciaddr correctly.

10 years agoSend the IPv4LL interface to listeners.
Roy Marples [Mon, 29 Jun 2015 15:31:33 +0000 (15:31 +0000)] 
Send the IPv4LL interface to listeners.
Send the expired IP in the old_ prefix.

10 years agoClarify IPV4LL.
Roy Marples [Mon, 29 Jun 2015 15:06:21 +0000 (15:06 +0000)] 
Clarify IPV4LL.

10 years agoAdd an ipv4ll suffix just in case
Roy Marples [Mon, 29 Jun 2015 15:04:37 +0000 (15:04 +0000)] 
Add an ipv4ll suffix just in case

10 years agoAdd an option to keep arp state when deleting addresses, which is needed
Roy Marples [Mon, 29 Jun 2015 15:03:31 +0000 (15:03 +0000)] 
Add an option to keep arp state when deleting addresses, which is needed
for IPv4LL.
Call IPV4LL instead of EXPIRE when removing the IPV4LL address,
which is similar to how ROUTERADVERT works.

10 years agoSet interface is up when running IPV4LL scripts.
Roy Marples [Mon, 29 Jun 2015 13:09:57 +0000 (13:09 +0000)] 
Set interface is up when running IPV4LL scripts.

10 years agoReplace custom uptime() with clock_gettime(2) calls for more accurate
Roy Marples [Mon, 29 Jun 2015 12:39:44 +0000 (12:39 +0000)] 
Replace custom uptime() with clock_gettime(2) calls for more accurate
time handling.

10 years agoRemove pointless warning
Roy Marples [Sat, 27 Jun 2015 18:52:10 +0000 (18:52 +0000)] 
Remove pointless warning

10 years agoFix compile
Roy Marples [Fri, 26 Jun 2015 20:17:14 +0000 (20:17 +0000)] 
Fix compile

10 years agoAs DHCP and IPv4LL now have separate route generators, we need to assign
Roy Marples [Fri, 26 Jun 2015 19:37:31 +0000 (19:37 +0000)] 
As DHCP and IPv4LL now have separate route generators, we need to assign
the source address when we get them, not each time we parse them.
Also, assign the source address to the route when reading from the kernel.

10 years agoAnnounce the address.
Roy Marples [Fri, 26 Jun 2015 18:02:06 +0000 (18:02 +0000)] 
Announce the address.

10 years agoRemove the complex ARP logic when binding a lease and fix adding a lease.
Roy Marples [Fri, 26 Jun 2015 17:43:34 +0000 (17:43 +0000)] 
Remove the complex ARP logic when binding a lease and fix adding a lease.

10 years agoRemove the arp_state argument to dhcp_bind
Roy Marples [Fri, 26 Jun 2015 13:21:38 +0000 (13:21 +0000)] 
Remove the arp_state argument to dhcp_bind

10 years agoAnnounce our IPv4LL address.
Roy Marples [Fri, 26 Jun 2015 08:43:46 +0000 (08:43 +0000)] 
Announce our IPv4LL address.

11 years agoEven if we ignore the RA due to no public addresses, we still need to initiate
Roy Marples [Thu, 25 Jun 2015 16:07:02 +0000 (16:07 +0000)] 
Even if we ignore the RA due to no public addresses, we still need to initiate
DHCP if needed.
Fixes [0bd01a312d].

11 years agoCorrect address test, thanks to Michał Kępień.
Roy Marples [Thu, 25 Jun 2015 15:39:04 +0000 (15:39 +0000)] 
Correct address test, thanks to Michał Kępień.
Partial fix for [0bd01a312d].

11 years agoAdd an free callback to ARP states so that they can notify their parents they
Roy Marples [Thu, 25 Jun 2015 15:36:28 +0000 (15:36 +0000)] 
Add an free callback to ARP states so that they can notify their parents they
are gone to avoid any double frees.
Fixes [5fdd9b8d08].

11 years agoOnly use MRT if we have an MRT
Roy Marples [Wed, 24 Jun 2015 14:44:18 +0000 (14:44 +0000)] 
Only use MRT if we have an MRT

11 years agoAdd a guard to ensure failure to send a DHCP release does not cause a double free...
Roy Marples [Wed, 24 Jun 2015 14:16:05 +0000 (14:16 +0000)] 
Add a guard to ensure failure to send a DHCP release does not cause a double free via re-entering _drop().
Thanks to Todd Blanchard for the analysis.
Fixes [cd38af54ff]

11 years agoRemove redundant IPv4LL checks
Roy Marples [Tue, 23 Jun 2015 08:34:56 +0000 (08:34 +0000)] 
Remove redundant IPv4LL checks

11 years agoEnsure we have an IPv4 state before starting DHCP.
Roy Marples [Sat, 20 Jun 2015 12:09:55 +0000 (12:09 +0000)] 
Ensure we have an IPv4 state before starting DHCP.

11 years agoRemove the root check - invalid permission errors should be logged.
Roy Marples [Fri, 19 Jun 2015 16:43:08 +0000 (16:43 +0000)] 
Remove the root check - invalid permission errors should be logged.

11 years agoSet the BPF memory to zero.
Roy Marples [Fri, 19 Jun 2015 14:24:12 +0000 (14:24 +0000)] 
Set the BPF memory to zero.

11 years agoMove the BPF buffer from DHCP into IPv4 where it belongs.
Roy Marples [Fri, 19 Jun 2015 14:17:18 +0000 (14:17 +0000)] 
Move the BPF buffer from DHCP into IPv4 where it belongs.

11 years agoFix compile
Roy Marples [Fri, 19 Jun 2015 14:09:37 +0000 (14:09 +0000)] 
Fix compile

11 years agoMove ARP state out of DHCP.
Roy Marples [Fri, 19 Jun 2015 14:01:25 +0000 (14:01 +0000)] 
Move ARP state out of DHCP.

11 years agoFree the ARP state on conflict rather than just closing ARP.
Roy Marples [Fri, 19 Jun 2015 13:19:06 +0000 (13:19 +0000)] 
Free the ARP state on conflict rather than just closing ARP.

11 years agoIf we free the last ARP state, close the ARP socket.
Roy Marples [Fri, 19 Jun 2015 13:17:10 +0000 (13:17 +0000)] 
If we free the last ARP state, close the ARP socket.

11 years agoEven though WPAD is an expired RFC, some browsers are supporting the
Roy Marples [Fri, 19 Jun 2015 12:00:28 +0000 (12:00 +0000)] 
Even though WPAD is an expired RFC, some browsers are supporting the
DHCP option for it.

11 years agoEnsure we can always read the DHCP option length when applicable.
Roy Marples [Fri, 19 Jun 2015 11:31:50 +0000 (11:31 +0000)] 
Ensure we can always read the DHCP option length when applicable.
Fixes CVE-2014-7912.

11 years agoImprove error handling for option length.
Roy Marples [Fri, 19 Jun 2015 10:28:27 +0000 (10:28 +0000)] 
Improve error handling for option length.

11 years agoWhen we have a zero length for an embedded option, warn if any more data
Roy Marples [Fri, 19 Jun 2015 09:50:36 +0000 (09:50 +0000)] 
When we have a zero length for an embedded option, warn if any more data
or not the last option and return the number of currently processed options.
This fixes a potential buffer overrun for options where the last embedded
optional is an optional string.

Thanks to Paul Stewart @ Chromium for the fix.

11 years agoStyle
Roy Marples [Tue, 16 Jun 2015 09:36:54 +0000 (09:36 +0000)] 
Style

11 years agoCheck the interface has an IPv4 state before enumarting addresses.
Roy Marples [Tue, 16 Jun 2015 09:34:23 +0000 (09:34 +0000)] 
Check the interface has an IPv4 state before enumarting addresses.

11 years agoRemove a pre-existing IPv4LL address when binding a DHCP address.
Roy Marples [Mon, 15 Jun 2015 09:59:37 +0000 (09:59 +0000)] 
Remove a pre-existing IPv4LL address when binding a DHCP address.

11 years agoAllow IPv4LL to qualify an added address.
Roy Marples [Sun, 14 Jun 2015 14:42:24 +0000 (14:42 +0000)] 
Allow IPv4LL to qualify an added address.

11 years agoBuild routes and daemonise when we get an IPv4LL address.
Roy Marples [Sat, 13 Jun 2015 10:33:56 +0000 (10:33 +0000)] 
Build routes and daemonise when we get an IPv4LL address.

11 years agoImprove IPv4LL debug messages.
Roy Marples [Fri, 12 Jun 2015 21:05:21 +0000 (21:05 +0000)] 
Improve IPv4LL debug messages.

11 years agoFix compile on BSD
Roy Marples [Fri, 12 Jun 2015 20:51:22 +0000 (20:51 +0000)] 
Fix compile on BSD

11 years agoFix network_number.
Roy Marples [Fri, 12 Jun 2015 20:27:12 +0000 (20:27 +0000)] 
Fix network_number.

11 years agoUse macro HTONL to fix compile on Linux and drop address correctly.
Roy Marples [Fri, 12 Jun 2015 20:25:42 +0000 (20:25 +0000)] 
Use macro HTONL to fix compile on Linux and drop address correctly.

11 years agoAdd a macro version of htonl(3).
Roy Marples [Fri, 12 Jun 2015 20:25:04 +0000 (20:25 +0000)] 
Add a macro version of htonl(3).

11 years agoFix IPV4LL making the correct environment.
Roy Marples [Fri, 12 Jun 2015 20:24:12 +0000 (20:24 +0000)] 
Fix IPV4LL making the correct environment.

11 years agoAdd the DHCPCD_NODROP macro to simplify if we drop addresses or not.
Roy Marples [Fri, 12 Jun 2015 20:23:28 +0000 (20:23 +0000)] 
Add the DHCPCD_NODROP macro to simplify if we drop addresses or not.

11 years agoStop making IPv4LL into a DHCP lease and treat it independantly from any
Roy Marples [Fri, 12 Jun 2015 19:21:32 +0000 (19:21 +0000)] 
Stop making IPv4LL into a DHCP lease and treat it independantly from any
DHCP lease.
This allows us to manage IPv4LL and DHCP at the same time a lot easier.

11 years agoCheck fclose(3) writes correctly, thanks to Bob.
Roy Marples [Fri, 12 Jun 2015 09:54:09 +0000 (09:54 +0000)] 
Check fclose(3) writes correctly, thanks to Bob.

11 years agoSet af_waiting if any interface or global is waiting.
Roy Marples [Tue, 9 Jun 2015 20:00:39 +0000 (20:00 +0000)] 
Set af_waiting if any interface or global is waiting.

11 years agoRemove if_oneup and replace with if_afwaited and af_waited.
Roy Marples [Tue, 9 Jun 2015 19:47:53 +0000 (19:47 +0000)] 
Remove if_oneup and replace with if_afwaited and af_waited.
If present, they will show the address family waiting for.

11 years agoDescribe which IP address family we are waiting for.
Roy Marples [Tue, 9 Jun 2015 18:50:17 +0000 (18:50 +0000)] 
Describe which IP address family we are waiting for.

11 years agoLog IPv4 DAD completing when the kernel handles DAD.
Roy Marples [Tue, 9 Jun 2015 16:43:20 +0000 (16:43 +0000)] 
Log IPv4 DAD completing when the kernel handles DAD.

11 years agoRemove the pseudo interface created for prefix delegation and mix different
Roy Marples [Fri, 5 Jun 2015 22:06:05 +0000 (22:06 +0000)] 
Remove the pseudo interface created for prefix delegation and mix different
IA options in one DHCP state as recommended by RFC 7550.

Hopefully this will simplify support a great deal.

11 years agoReject any NA/RA message with a hoplimit not equal to 255 as per RFC 4861 7.1.2.
Roy Marples [Fri, 5 Jun 2015 14:55:08 +0000 (14:55 +0000)] 
Reject any NA/RA message with a hoplimit not equal to 255 as per RFC 4861 7.1.2.

11 years agoAdd an option to skip the initial randomised protocol delay.
Roy Marples [Wed, 3 Jun 2015 10:34:15 +0000 (10:34 +0000)] 
Add an option to skip the initial randomised protocol delay.

11 years agoEven if the script is /dev/null or NULL, always send the scripted environment
Roy Marples [Wed, 3 Jun 2015 10:13:37 +0000 (10:13 +0000)] 
Even if the script is /dev/null or NULL, always send the scripted environment
to our listeners.

11 years agoDisable IP address waiting for pseudo interfaces, fixes [1972d664c2].
Roy Marples [Sun, 31 May 2015 08:19:34 +0000 (08:19 +0000)] 
Disable IP address waiting for pseudo interfaces, fixes [1972d664c2].

11 years agoSend and release if we have an address to send to.
Roy Marples [Fri, 29 May 2015 20:05:04 +0000 (20:05 +0000)] 
Send and release if we have an address to send to.

11 years agoSet the magic cookie on our faked DHCP messages so we correctly get
Roy Marples [Fri, 29 May 2015 13:42:28 +0000 (13:42 +0000)] 
Set the magic cookie on our faked DHCP messages so we correctly get
the subnet.
Fixes [ea294abc09].

11 years agoUse strtoi(3) instead of sscanf(3) to grab CIDR from an address.
Roy Marples [Fri, 29 May 2015 13:00:58 +0000 (13:00 +0000)] 
Use strtoi(3) instead of sscanf(3) to grab CIDR from an address.

11 years agoReport the new nd_ options.
Roy Marples [Mon, 25 May 2015 00:16:11 +0000 (00:16 +0000)] 
Report the new nd_ options.

11 years agoOnly blank out wait options if we are parsing a valid block for us.
Roy Marples [Sat, 23 May 2015 13:09:22 +0000 (13:09 +0000)] 
Only blank out wait options if we are parsing a valid block for us.
Another fix for [1972d664c2].

11 years agoFix ARP checking.
Roy Marples [Sat, 23 May 2015 11:38:13 +0000 (11:38 +0000)] 
Fix ARP checking.

11 years agoEnsure that new_block is zero before use, fixes [1972d664c2].
Roy Marples [Sat, 23 May 2015 08:36:34 +0000 (08:36 +0000)] 
Ensure that new_block is zero before use, fixes [1972d664c2].

11 years agoMove the Is The Route a Host Route check to when we extract the static routes
Roy Marples [Sat, 23 May 2015 08:26:15 +0000 (08:26 +0000)] 
Move the Is The Route a Host Route check to when we extract the static routes
instead of checking all derived routes.
Fixes [0d526c8558].

11 years agoFix waiting for ip address, [1972d664c2].
Roy Marples [Wed, 20 May 2015 10:25:10 +0000 (10:25 +0000)] 
Fix waiting for ip address, [1972d664c2].

11 years agoUse xz instead of bzip2 to create the distribution.
Roy Marples [Mon, 18 May 2015 11:21:50 +0000 (11:21 +0000)] 
Use xz instead of bzip2 to create the distribution.