]>
git.ipfire.org Git - thirdparty/dhcpcd.git/log
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.
Roy Marples [Fri, 26 Jun 2015 18:02:06 +0000 (18:02 +0000)]
Announce the address.
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.
Roy Marples [Fri, 26 Jun 2015 13:21:38 +0000 (13:21 +0000)]
Remove the arp_state argument to dhcp_bind
Roy Marples [Fri, 26 Jun 2015 08:43:46 +0000 (08:43 +0000)]
Announce our IPv4LL address.
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 ].
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 ].
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 ].
Roy Marples [Wed, 24 Jun 2015 14:44:18 +0000 (14:44 +0000)]
Only use MRT if we have an MRT
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 ]
Roy Marples [Tue, 23 Jun 2015 08:34:56 +0000 (08:34 +0000)]
Remove redundant IPv4LL checks
Roy Marples [Sat, 20 Jun 2015 12:09:55 +0000 (12:09 +0000)]
Ensure we have an IPv4 state before starting DHCP.
Roy Marples [Fri, 19 Jun 2015 16:43:08 +0000 (16:43 +0000)]
Remove the root check - invalid permission errors should be logged.
Roy Marples [Fri, 19 Jun 2015 14:24:12 +0000 (14:24 +0000)]
Set the BPF memory to zero.
Roy Marples [Fri, 19 Jun 2015 14:17:18 +0000 (14:17 +0000)]
Move the BPF buffer from DHCP into IPv4 where it belongs.
Roy Marples [Fri, 19 Jun 2015 14:09:37 +0000 (14:09 +0000)]
Fix compile
Roy Marples [Fri, 19 Jun 2015 14:01:25 +0000 (14:01 +0000)]
Move ARP state out of DHCP.
Roy Marples [Fri, 19 Jun 2015 13:19:06 +0000 (13:19 +0000)]
Free the ARP state on conflict rather than just closing ARP.
Roy Marples [Fri, 19 Jun 2015 13:17:10 +0000 (13:17 +0000)]
If we free the last ARP state, close the ARP socket.
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.
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.
Roy Marples [Fri, 19 Jun 2015 10:28:27 +0000 (10:28 +0000)]
Improve error handling for option length.
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.
Roy Marples [Tue, 16 Jun 2015 09:36:54 +0000 (09:36 +0000)]
Style
Roy Marples [Tue, 16 Jun 2015 09:34:23 +0000 (09:34 +0000)]
Check the interface has an IPv4 state before enumarting addresses.
Roy Marples [Mon, 15 Jun 2015 09:59:37 +0000 (09:59 +0000)]
Remove a pre-existing IPv4LL address when binding a DHCP address.
Roy Marples [Sun, 14 Jun 2015 14:42:24 +0000 (14:42 +0000)]
Allow IPv4LL to qualify an added address.
Roy Marples [Sat, 13 Jun 2015 10:33:56 +0000 (10:33 +0000)]
Build routes and daemonise when we get an IPv4LL address.
Roy Marples [Fri, 12 Jun 2015 21:05:21 +0000 (21:05 +0000)]
Improve IPv4LL debug messages.
Roy Marples [Fri, 12 Jun 2015 20:51:22 +0000 (20:51 +0000)]
Fix compile on BSD
Roy Marples [Fri, 12 Jun 2015 20:27:12 +0000 (20:27 +0000)]
Fix network_number.
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.
Roy Marples [Fri, 12 Jun 2015 20:25:04 +0000 (20:25 +0000)]
Add a macro version of htonl(3).
Roy Marples [Fri, 12 Jun 2015 20:24:12 +0000 (20:24 +0000)]
Fix IPV4LL making the correct environment.
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.
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.
Roy Marples [Fri, 12 Jun 2015 09:54:09 +0000 (09:54 +0000)]
Check fclose(3) writes correctly, thanks to Bob.
Roy Marples [Tue, 9 Jun 2015 20:00:39 +0000 (20:00 +0000)]
Set af_waiting if any interface or global is waiting.
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.
Roy Marples [Tue, 9 Jun 2015 18:50:17 +0000 (18:50 +0000)]
Describe which IP address family we are waiting for.
Roy Marples [Tue, 9 Jun 2015 16:43:20 +0000 (16:43 +0000)]
Log IPv4 DAD completing when the kernel handles DAD.
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.
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.
Roy Marples [Wed, 3 Jun 2015 10:34:15 +0000 (10:34 +0000)]
Add an option to skip the initial randomised protocol delay.
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.
Roy Marples [Sun, 31 May 2015 08:19:34 +0000 (08:19 +0000)]
Disable IP address waiting for pseudo interfaces, fixes [
1972d664c2 ].
Roy Marples [Fri, 29 May 2015 20:05:04 +0000 (20:05 +0000)]
Send and release if we have an address to send to.
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 ].
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.
Roy Marples [Mon, 25 May 2015 00:16:11 +0000 (00:16 +0000)]
Report the new nd_ options.
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 ].
Roy Marples [Sat, 23 May 2015 11:38:13 +0000 (11:38 +0000)]
Fix ARP checking.
Roy Marples [Sat, 23 May 2015 08:36:34 +0000 (08:36 +0000)]
Ensure that new_block is zero before use, fixes [
1972d664c2 ].
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 ].
Roy Marples [Wed, 20 May 2015 10:25:10 +0000 (10:25 +0000)]
Fix waiting for ip address, [
1972d664c2 ].
Roy Marples [Mon, 18 May 2015 11:21:50 +0000 (11:21 +0000)]
Use xz instead of bzip2 to create the distribution.
Roy Marples [Sat, 16 May 2015 23:07:35 +0000 (23:07 +0000)]
Release dhcpcd-6.9.0
Roy Marples [Sat, 16 May 2015 22:06:45 +0000 (22:06 +0000)]
Ensure we have a state when prefering another address.
Roy Marples [Sat, 16 May 2015 21:39:56 +0000 (21:39 +0000)]
Add an assert to fix an impossible clang analyzer condition
Roy Marples [Sat, 16 May 2015 21:16:59 +0000 (21:16 +0000)]
Fix a control socketm error.
Roy Marples [Sat, 16 May 2015 21:01:23 +0000 (21:01 +0000)]
Fix some casts.
Roy Marples [Sat, 16 May 2015 20:42:05 +0000 (20:42 +0000)]
Improve IN_IFF_TENTATIVE with ip sharing.
Roy Marples [Sat, 16 May 2015 10:11:00 +0000 (10:11 +0000)]
Make this easier to read.
Roy Marples [Fri, 15 May 2015 22:05:17 +0000 (22:05 +0000)]
Don't send DHCP messages when we don't have a carrier.
Roy Marples [Fri, 15 May 2015 22:02:39 +0000 (22:02 +0000)]
Check a DHCP state exists when deleting an address from an interface.
Roy Marples [Fri, 15 May 2015 21:08:14 +0000 (21:08 +0000)]
Fix compile on FreeBSD
Roy Marples [Fri, 15 May 2015 19:41:33 +0000 (19:41 +0000)]
OpenBSD fixes.
Roy Marples [Fri, 15 May 2015 15:23:42 +0000 (15:23 +0000)]
Fix building without INET or INET6.
Roy Marples [Fri, 15 May 2015 15:10:26 +0000 (15:10 +0000)]
Fix another analyzer error.
Roy Marples [Fri, 15 May 2015 14:58:04 +0000 (14:58 +0000)]
Fix an analyzer error.
Roy Marples [Fri, 15 May 2015 14:32:54 +0000 (14:32 +0000)]
For now, ignore ND DNS lifetimes unless they are absent or zero, in
which case they are removed from consideration.
Roy Marples [Fri, 15 May 2015 13:47:35 +0000 (13:47 +0000)]
For each ND, output the time of acquisition and the current time in seconds.
Roy Marples [Fri, 15 May 2015 10:01:24 +0000 (10:01 +0000)]
Add new variable of type bitflags:flags
where the flags ABCDEFGH, A is
10000000 , B is
01000000 , etc.
Variables with the name reserved are no longer processed.
Roy Marples [Thu, 14 May 2015 20:18:58 +0000 (20:18 +0000)]
Fix compile on NetBSD.
Roy Marples [Thu, 14 May 2015 20:13:18 +0000 (20:13 +0000)]
gcc cleanups
Roy Marples [Thu, 14 May 2015 19:46:21 +0000 (19:46 +0000)]
Handle ND options in the same way we handle DHCP and DHCPv6 options.
Roy Marples [Thu, 14 May 2015 13:45:13 +0000 (13:45 +0000)]
Fix compile on Linux.
Roy Marples [Thu, 14 May 2015 09:20:26 +0000 (09:20 +0000)]
Fix waiting on non interface ip, [
2095791c47 ].
Roy Marples [Thu, 14 May 2015 09:17:37 +0000 (09:17 +0000)]
Allow waitip to work per interface.
Remove ipwaited from dhcpcd-run-hooks as it's now redundant.
Fixes [
2095791c47 ].
Roy Marples [Thu, 14 May 2015 07:35:49 +0000 (07:35 +0000)]
Improve eloop api so we don't force a delete write parameter when
deleting events.
Roy Marples [Wed, 13 May 2015 02:00:55 +0000 (02:00 +0000)]
hmmmm, seems this isn't needed anymore ...
Roy Marples [Wed, 13 May 2015 01:53:01 +0000 (01:53 +0000)]
Ensure adding an event does not have an fd of -1
Roy Marples [Wed, 13 May 2015 01:22:58 +0000 (01:22 +0000)]
Disable asserts for non debug builds.
Roy Marples [Wed, 13 May 2015 01:12:47 +0000 (01:12 +0000)]
Ensure oldset is empty before sigprocmask call ... unsure why this is needed.
Roy Marples [Wed, 13 May 2015 00:53:45 +0000 (00:53 +0000)]
Ensure kqueue/epoll fd is open on init.
Roy Marples [Wed, 13 May 2015 00:23:43 +0000 (00:23 +0000)]
Sprinkle some asserts
Roy Marples [Tue, 12 May 2015 23:47:25 +0000 (23:47 +0000)]
setting signals should require an explicit len rather than NULL termination.
Roy Marples [Tue, 12 May 2015 20:07:34 +0000 (20:07 +0000)]
Fix compile on BSD
Roy Marples [Tue, 12 May 2015 20:04:28 +0000 (20:04 +0000)]
Use ppoll as pollts if available.
Roy Marples [Tue, 12 May 2015 20:03:36 +0000 (20:03 +0000)]
Remove compat for polling, dhcpcd now requires pselect as a minimum fallback.
Roy Marples [Tue, 12 May 2015 19:55:45 +0000 (19:55 +0000)]
Add a pollts wrapper in eloop.c directly so it really should be stand alone
now!
Roy Marples [Tue, 12 May 2015 19:42:44 +0000 (19:42 +0000)]
Improve eloop loading sys/queue.h
Roy Marples [Tue, 12 May 2015 17:24:29 +0000 (17:24 +0000)]
Make eloop entirely independant from dhcpcd.
Roy Marples [Tue, 12 May 2015 14:53:38 +0000 (14:53 +0000)]
eloop_ctx -> eloop
Roy Marples [Tue, 12 May 2015 14:14:32 +0000 (14:14 +0000)]
Move signal handling into eloop with just the callback in dhcpcd.
This allows a cleaner platform agnostic signal setup in dhcpcd itself.
Roy Marples [Tue, 12 May 2015 08:30:21 +0000 (08:30 +0000)]
Replace get_monotonic usage with the standard clock_gettime.
Roy Marples [Sat, 9 May 2015 10:11:51 +0000 (10:11 +0000)]
Fix prior
Roy Marples [Sat, 9 May 2015 10:09:34 +0000 (10:09 +0000)]
Remove dhcpcd specifics from eloop to make more portable.
Roy Marples [Sat, 9 May 2015 06:12:08 +0000 (06:12 +0000)]
Note we cannot set static DHCPv6 values.
Roy Marples [Sat, 9 May 2015 06:02:49 +0000 (06:02 +0000)]
Check if we have an IPv6 context before expiring RA's.