]>
git.ipfire.org Git - thirdparty/dhcpcd.git/log
Roy Marples [Thu, 18 Sep 2014 08:52:46 +0000 (08:52 +0000)]
Remove linux/ipv6.h from everywhere except ipv6.h.
Only bring in linux/ipv6.h if linux AND glibc.
Roy Marples [Thu, 18 Sep 2014 08:46:10 +0000 (08:46 +0000)]
Remove all caddr_t usage
Roy Marples [Thu, 18 Sep 2014 08:42:41 +0000 (08:42 +0000)]
Remove some caddr_t usage.
Roy Marples [Thu, 18 Sep 2014 08:12:43 +0000 (08:12 +0000)]
Clean up some compile errors.
Roy Marples [Thu, 18 Sep 2014 07:02:43 +0000 (07:02 +0000)]
Fix compile on BSD
Roy Marples [Thu, 18 Sep 2014 00:35:03 +0000 (00:35 +0000)]
Remove all instances of if_indextoname and add a replacement
if_findindex as we should already have the interface at this point.
Roy Marples [Tue, 16 Sep 2014 22:09:42 +0000 (22:09 +0000)]
Release dhcpcd-6.4.4
Roy Marples [Tue, 16 Sep 2014 14:00:25 +0000 (14:00 +0000)]
Fix a memory leak handling carrier drops with a psuedo interface.
Roy Marples [Tue, 16 Sep 2014 10:22:24 +0000 (10:22 +0000)]
This fix is wrong, real fix in libdhcpcd.
Roy Marples [Tue, 16 Sep 2014 00:12:30 +0000 (00:12 +0000)]
Remove dead code.
Roy Marples [Mon, 15 Sep 2014 23:47:01 +0000 (23:47 +0000)]
Randomise IPv4 static setup as well so we don't pick up the kernel delete message on rebooting.
Roy Marples [Mon, 15 Sep 2014 23:05:20 +0000 (23:05 +0000)]
It's possible to configure a Linux kernel with nl80211 where the
SSID won't be reported, but is available via WEXT.
This is very silly, but dhcpcd still needs to work.
Thus enable both protocols and use nl80211 if WEXT fails.
Roy Marples [Mon, 15 Sep 2014 22:50:44 +0000 (22:50 +0000)]
Fix FD_LISTEN | FD_UNPRIV flags
Roy Marples [Mon, 15 Sep 2014 22:35:00 +0000 (22:35 +0000)]
The args sent from control socket do not include a program in argv[0]
so we need to adjustem them to pretend that they do.
Tests show that getopt(3) doesn't look at argv[0] so it's safe(ish).
Roy Marples [Mon, 15 Sep 2014 08:16:36 +0000 (08:16 +0000)]
Back out mistaken commit
Roy Marples [Mon, 15 Sep 2014 08:13:45 +0000 (08:13 +0000)]
Describe master mode some more.
Roy Marples [Sun, 14 Sep 2014 19:12:57 +0000 (19:12 +0000)]
Add an unprivileged control socket so that normal users can
obtain dhcpcd running state.
Roy Marples [Sun, 14 Sep 2014 06:53:13 +0000 (06:53 +0000)]
Fix compile without -DINET6
Roy Marples [Sat, 13 Sep 2014 23:42:18 +0000 (23:42 +0000)]
Add wpa_supplicant_driver option for nl80211 users.
Roy Marples [Sat, 13 Sep 2014 14:57:45 +0000 (14:57 +0000)]
No longer need the header stdarg.h
Roy Marples [Sat, 13 Sep 2014 14:55:55 +0000 (14:55 +0000)]
Punt this now un-used function eloop_q_timeouts_delete
Roy Marples [Sat, 13 Sep 2014 14:21:13 +0000 (14:21 +0000)]
Roy Marples [Fri, 12 Sep 2014 13:26:28 +0000 (13:26 +0000)]
Fix expire and re-solicit on drop
Roy Marples [Fri, 12 Sep 2014 08:34:47 +0000 (08:34 +0000)]
SVCNAME -> RC_SVCNAME
Roy Marples [Thu, 11 Sep 2014 14:30:52 +0000 (14:30 +0000)]
Revert [
2a977647fe24819f38b64c8ed7257c0bc27c8328 ] because if the
services are touched in anyway by an exit hook their status might not
be entirely accurate.
Fixes some issues with parallel service management systems.
Roy Marples [Thu, 11 Sep 2014 13:29:56 +0000 (13:29 +0000)]
Improve the waitip test.
Roy Marples [Thu, 11 Sep 2014 12:33:57 +0000 (12:33 +0000)]
We should always have the flags variable.
Roy Marples [Thu, 11 Sep 2014 11:37:10 +0000 (11:37 +0000)]
Fix more clang analyzer errors.
Roy Marples [Thu, 11 Sep 2014 11:02:37 +0000 (11:02 +0000)]
Fix some clang analyzer errors
Roy Marples [Wed, 10 Sep 2014 17:54:31 +0000 (17:54 +0000)]
Record the fd which had an error.
Roy Marples [Wed, 10 Sep 2014 17:47:59 +0000 (17:47 +0000)]
The absence of a NL80211_ATTR_SSID means that the interface is not
associated to the AP, not an error.
Also, fix some style.
Roy Marples [Wed, 10 Sep 2014 16:36:24 +0000 (16:36 +0000)]
Fix parsing the netlink message when no options are present.
Roy Marples [Wed, 10 Sep 2014 16:22:18 +0000 (16:22 +0000)]
Close the socket on non continueable errors.
Roy Marples [Wed, 10 Sep 2014 10:00:08 +0000 (10:00 +0000)]
Allow SSIDs with non printable characters to be used in ssid selection in
dhcpcd.conf and generate more accurate stable private addresses.
Roy Marples [Wed, 10 Sep 2014 09:10:15 +0000 (09:10 +0000)]
OpenBSD now correctly opens the socket as NONBLOCKing.
Roy Marples [Wed, 10 Sep 2014 08:40:06 +0000 (08:40 +0000)]
Fix nl80211.h test
Roy Marples [Wed, 10 Sep 2014 07:21:18 +0000 (07:21 +0000)]
Fix compile on OpenBSD.
Roy Marples [Wed, 10 Sep 2014 02:22:18 +0000 (02:22 +0000)]
Fix arc4random_uniform test.
Rename if-linux-wireless.c to if-linux-wext.c to better reflect it's purpose.
Roy Marples [Wed, 10 Sep 2014 02:02:21 +0000 (02:02 +0000)]
Fix compile and warnings on BSD.
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.
Roy Marples [Tue, 9 Sep 2014 12:59:08 +0000 (12:59 +0000)]
Document every variable set for dhcpcd-run-hooks(8)
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).
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
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.
Roy Marples [Sun, 7 Sep 2014 18:33:30 +0000 (18:33 +0000)]
Add needed includes for some systems.
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.
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.
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.
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.
Roy Marples [Thu, 4 Sep 2014 19:32:25 +0000 (19:32 +0000)]
Fix compile for dev manager.
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.
Roy Marples [Thu, 4 Sep 2014 16:23:36 +0000 (16:23 +0000)]
--getinterfaces no longer supports an option interface list.
Roy Marples [Tue, 2 Sep 2014 23:41:52 +0000 (23:41 +0000)]
Fix the number of interfaces we actually send
Roy Marples [Tue, 2 Sep 2014 13:53:16 +0000 (13:53 +0000)]
Close the sockets after shutting them down.
Roy Marples [Tue, 2 Sep 2014 07:41:15 +0000 (07:41 +0000)]
Don't log an interface for the global error.
Roy Marples [Mon, 1 Sep 2014 16:39:58 +0000 (16:39 +0000)]
Minor optimisation.
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.
Roy Marples [Wed, 20 Aug 2014 09:20:49 +0000 (09:20 +0000)]
Whitespace
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.
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.
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.
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.
Roy Marples [Thu, 7 Aug 2014 09:54:19 +0000 (09:54 +0000)]
Optimize auth_len a little.
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.
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.
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.
Roy Marples [Thu, 31 Jul 2014 00:57:47 +0000 (00:57 +0000)]
Fix dependency and test targets
Roy Marples [Wed, 30 Jul 2014 15:13:12 +0000 (15:13 +0000)]
Release dhcpcd-6.4.3
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.
Roy Marples [Wed, 30 Jul 2014 10:03:14 +0000 (10:03 +0000)]
Remove some unused variables
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.
Roy Marples [Wed, 30 Jul 2014 09:46:33 +0000 (09:46 +0000)]
Fix the import to work on Linux as well.
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.
Roy Marples [Mon, 28 Jul 2014 09:19:27 +0000 (09:19 +0000)]
Fix compile on NetBSD-6
Roy Marples [Mon, 28 Jul 2014 09:15:04 +0000 (09:15 +0000)]
Test no useable IA in each lease validation.
Roy Marples [Fri, 25 Jul 2014 12:49:53 +0000 (12:49 +0000)]
With an unknown link, test carrier manually and loop 100ms.
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.
Roy Marples [Mon, 21 Jul 2014 19:08:22 +0000 (19:08 +0000)]
Use realloc instead of free/malloc.
Roy Marples [Mon, 21 Jul 2014 19:05:32 +0000 (19:05 +0000)]
Ensure that a given buffer is at least BUFSIZ.
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.
Roy Marples [Thu, 17 Jul 2014 08:21:07 +0000 (08:21 +0000)]
Just do length
Roy Marples [Thu, 17 Jul 2014 08:19:53 +0000 (08:19 +0000)]
Correct DHCPv6 Prefix Delegation option decoding
Roy Marples [Mon, 14 Jul 2014 15:43:00 +0000 (15:43 +0000)]
Typos
Roy Marples [Mon, 14 Jul 2014 13:58:24 +0000 (13:58 +0000)]
Fix import
Roy Marples [Mon, 14 Jul 2014 13:43:33 +0000 (13:43 +0000)]
Release dhcpcd-6.4.2
Roy Marples [Mon, 14 Jul 2014 12:55:19 +0000 (12:55 +0000)]
Fix gcc build errors.
Roy Marples [Mon, 14 Jul 2014 11:30:15 +0000 (11:30 +0000)]
Release dhcpcd-6.4.1
Roy Marples [Sun, 13 Jul 2014 22:01:01 +0000 (22:01 +0000)]
Use __NetBSD_Version__ macro instead of __NetBSD_Prereq__
Roy Marples [Fri, 11 Jul 2014 13:24:29 +0000 (13:24 +0000)]
Reduce use of s6_addr
Roy Marples [Fri, 11 Jul 2014 10:13:52 +0000 (10:13 +0000)]
Use structures to better bescribe IA and PD options.
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 ].
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.
Roy Marples [Wed, 9 Jul 2014 04:40:53 +0000 (04:40 +0000)]
Ensure iaid was previously set before testing equality.
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.
Roy Marples [Tue, 8 Jul 2014 19:28:52 +0000 (19:28 +0000)]
Fix delegated prefix handling and improve DAD checking.
Roy Marples [Tue, 8 Jul 2014 19:25:21 +0000 (19:25 +0000)]
ifclass= separates psuedo interfaces to avoid option collision.
Roy Marples [Tue, 8 Jul 2014 08:41:08 +0000 (08:41 +0000)]
Typo
Roy Marples [Tue, 8 Jul 2014 07:56:39 +0000 (07:56 +0000)]
Handle truncated saved leases.
Fixes [
7704dc4ae0 ]
Roy Marples [Mon, 7 Jul 2014 18:10:18 +0000 (18:10 +0000)]
Fix a null reference
Roy Marples [Mon, 7 Jul 2014 17:45:36 +0000 (17:45 +0000)]
Remove forced error