]> git.ipfire.org Git - thirdparty/dhcpcd.git/log
thirdparty/dhcpcd.git
10 years agoDon't discard expired leases when dumping.
Roy Marples [Wed, 24 Sep 2014 09:49:09 +0000 (09:49 +0000)] 
Don't discard expired leases when dumping.

10 years agoWe don't need to pass a signal handling function.
Roy Marples [Tue, 23 Sep 2014 09:08:17 +0000 (09:08 +0000)] 
We don't need to pass a signal handling function.

10 years agoFix some sign mismatch errors.
Roy Marples [Mon, 22 Sep 2014 21:02:21 +0000 (21:02 +0000)] 
Fix some sign mismatch errors.

10 years agoFix configure errors without pkg-config installed.
Roy Marples [Mon, 22 Sep 2014 13:57:58 +0000 (13:57 +0000)] 
Fix configure errors without pkg-config installed.

10 years agoDetect IPv6 route deletion on Linux.
Roy Marples [Mon, 22 Sep 2014 10:50:30 +0000 (10:50 +0000)] 
Detect IPv6 route deletion on Linux.

10 years agoFix compile on Linux.
Roy Marples [Mon, 22 Sep 2014 10:27:57 +0000 (10:27 +0000)] 
Fix compile on Linux.

10 years agoWe can't add link-local addresses to POINTOPOINT interfaces,
Roy Marples [Mon, 22 Sep 2014 10:03:03 +0000 (10:03 +0000)] 
We can't add link-local addresses to POINTOPOINT interfaces,
the PPP process has to.
Fixes [8fb17a419d].

10 years agoDetect removal of IPv6 routes on BSD
Roy Marples [Mon, 22 Sep 2014 09:33:29 +0000 (09:33 +0000)] 
Detect removal of IPv6 routes on BSD

10 years agoOnly hunt for a cross compiler if build != host.
Roy Marples [Sun, 21 Sep 2014 20:09:25 +0000 (20:09 +0000)] 
Only hunt for a cross compiler if build != host.

10 years agoRevert faulty patch
Roy Marples [Sun, 21 Sep 2014 20:05:20 +0000 (20:05 +0000)] 
Revert faulty patch

10 years agoOnly hunt for a cross compiler if build != host.
Roy Marples [Sun, 21 Sep 2014 20:01:53 +0000 (20:01 +0000)] 
Only hunt for a cross compiler if build != host.

10 years agoBring back inline in be*enc,dec as it's in a header.
Roy Marples [Sun, 21 Sep 2014 19:50:57 +0000 (19:50 +0000)] 
Bring back inline in be*enc,dec as it's in a header.

10 years agoRedirect fd 3 to config.log.
Roy Marples [Sun, 21 Sep 2014 11:39:02 +0000 (11:39 +0000)] 
Redirect fd 3 to config.log.
Redirect all CC errors to fd 3.

10 years agoCheck that CC works after applying all our CPPFLAGS and CFLAGS as one
Roy Marples [Sun, 21 Sep 2014 10:28:54 +0000 (10:28 +0000)] 
Check that CC works after applying all our CPPFLAGS and CFLAGS as one
of them might stop CC from working.

10 years agoRelease dhcpcd-6.4.5 v6.4.5
Roy Marples [Thu, 18 Sep 2014 20:33:46 +0000 (20:33 +0000)] 
Release dhcpcd-6.4.5

10 years agoRemove some inline keywords, let the compiler work it out better.
Roy Marples [Thu, 18 Sep 2014 15:12:45 +0000 (15:12 +0000)] 
Remove some inline keywords, let the compiler work it out better.

10 years agoCheck we have allocated IPv6 resources before checkings RA's.
Roy Marples [Thu, 18 Sep 2014 13:38:46 +0000 (13:38 +0000)] 
Check we have allocated IPv6 resources before checkings RA's.
Fixes [1e770ea479].

10 years agoAdd _DEFAULT_SOURCE #define to linux builds so glibc-2.20 stops bitching about _BSD_S...
Roy Marples [Thu, 18 Sep 2014 09:06:51 +0000 (09:06 +0000)] 
Add _DEFAULT_SOURCE #define to linux builds so glibc-2.20 stops bitching about _BSD_SOURCE

10 years agoRemove linux/ipv6.h from everywhere except ipv6.h.
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.

10 years agoRemove all caddr_t usage
Roy Marples [Thu, 18 Sep 2014 08:46:10 +0000 (08:46 +0000)] 
Remove all caddr_t usage

10 years agoRemove some caddr_t usage.
Roy Marples [Thu, 18 Sep 2014 08:42:41 +0000 (08:42 +0000)] 
Remove some caddr_t usage.

10 years agoClean up some compile errors.
Roy Marples [Thu, 18 Sep 2014 08:12:43 +0000 (08:12 +0000)] 
Clean up some compile errors.

10 years agoFix compile on BSD
Roy Marples [Thu, 18 Sep 2014 07:02:43 +0000 (07:02 +0000)] 
Fix compile on BSD

10 years agoRemove all instances of if_indextoname and add a replacement
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.

10 years agoRelease dhcpcd-6.4.4 v6.4.4
Roy Marples [Tue, 16 Sep 2014 22:09:42 +0000 (22:09 +0000)] 
Release dhcpcd-6.4.4

10 years agoFix a memory leak handling carrier drops with a psuedo interface.
Roy Marples [Tue, 16 Sep 2014 14:00:25 +0000 (14:00 +0000)] 
Fix a memory leak handling carrier drops with a psuedo interface.

10 years agoThis fix is wrong, real fix in libdhcpcd.
Roy Marples [Tue, 16 Sep 2014 10:22:24 +0000 (10:22 +0000)] 
This fix is wrong, real fix in libdhcpcd.

10 years agoRemove dead code.
Roy Marples [Tue, 16 Sep 2014 00:12:30 +0000 (00:12 +0000)] 
Remove dead code.

10 years agoRandomise IPv4 static setup as well so we don't pick up the kernel delete message...
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.

10 years agoIt's possible to configure a Linux kernel with nl80211 where the
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.

10 years agoFix FD_LISTEN | FD_UNPRIV flags
Roy Marples [Mon, 15 Sep 2014 22:50:44 +0000 (22:50 +0000)] 
Fix FD_LISTEN | FD_UNPRIV flags

10 years agoThe args sent from control socket do not include a program in argv[0]
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).

10 years agoBack out mistaken commit
Roy Marples [Mon, 15 Sep 2014 08:16:36 +0000 (08:16 +0000)] 
Back out mistaken commit

10 years agoDescribe master mode some more.
Roy Marples [Mon, 15 Sep 2014 08:13:45 +0000 (08:13 +0000)] 
Describe master mode some more.

10 years agoAdd an unprivileged control socket so that normal users can
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.

10 years agoFix compile without -DINET6
Roy Marples [Sun, 14 Sep 2014 06:53:13 +0000 (06:53 +0000)] 
Fix compile without -DINET6

10 years agoAdd wpa_supplicant_driver option for nl80211 users.
Roy Marples [Sat, 13 Sep 2014 23:42:18 +0000 (23:42 +0000)] 
Add wpa_supplicant_driver option for nl80211 users.

10 years agoNo longer need the header stdarg.h
Roy Marples [Sat, 13 Sep 2014 14:57:45 +0000 (14:57 +0000)] 
No longer need the header stdarg.h

10 years agoPunt this now un-used function eloop_q_timeouts_delete
Roy Marples [Sat, 13 Sep 2014 14:55:55 +0000 (14:55 +0000)] 
Punt this now un-used function eloop_q_timeouts_delete

10 years agoFix typo [afadc40198]
Roy Marples [Sat, 13 Sep 2014 14:21:13 +0000 (14:21 +0000)] 
Fix typo [afadc40198]

10 years agoFix expire and re-solicit on drop
Roy Marples [Fri, 12 Sep 2014 13:26:28 +0000 (13:26 +0000)] 
Fix expire and re-solicit on drop

10 years agoSVCNAME -> RC_SVCNAME
Roy Marples [Fri, 12 Sep 2014 08:34:47 +0000 (08:34 +0000)] 
SVCNAME -> RC_SVCNAME

10 years agoRevert [2a977647fe24819f38b64c8ed7257c0bc27c8328] because if the
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.

10 years agoImprove the waitip test.
Roy Marples [Thu, 11 Sep 2014 13:29:56 +0000 (13:29 +0000)] 
Improve the waitip test.

10 years agoWe should always have the flags variable.
Roy Marples [Thu, 11 Sep 2014 12:33:57 +0000 (12:33 +0000)] 
We should always have the flags variable.

10 years agoFix more clang analyzer errors.
Roy Marples [Thu, 11 Sep 2014 11:37:10 +0000 (11:37 +0000)] 
Fix more clang analyzer errors.

10 years agoFix some clang analyzer errors
Roy Marples [Thu, 11 Sep 2014 11:02:37 +0000 (11:02 +0000)] 
Fix some clang analyzer errors

10 years agoRecord the fd which had an error.
Roy Marples [Wed, 10 Sep 2014 17:54:31 +0000 (17:54 +0000)] 
Record the fd which had an error.

10 years agoThe absence of a NL80211_ATTR_SSID means that the interface is not
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.

10 years agoFix parsing the netlink message when no options are present.
Roy Marples [Wed, 10 Sep 2014 16:36:24 +0000 (16:36 +0000)] 
Fix parsing the netlink message when no options are present.

10 years agoClose the socket on non continueable errors.
Roy Marples [Wed, 10 Sep 2014 16:22:18 +0000 (16:22 +0000)] 
Close the socket on non continueable errors.

10 years agoAllow SSIDs with non printable characters to be used in ssid selection in
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.

10 years agoOpenBSD now correctly opens the socket as NONBLOCKing.
Roy Marples [Wed, 10 Sep 2014 09:10:15 +0000 (09:10 +0000)] 
OpenBSD now correctly opens the socket as NONBLOCKing.

10 years agoFix nl80211.h test
Roy Marples [Wed, 10 Sep 2014 08:40:06 +0000 (08:40 +0000)] 
Fix nl80211.h test

10 years agoFix compile on OpenBSD.
Roy Marples [Wed, 10 Sep 2014 07:21:18 +0000 (07:21 +0000)] 
Fix compile on OpenBSD.

10 years agoFix arc4random_uniform test.
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.

10 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.

10 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.

10 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)

10 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).

10 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

10 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.

10 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.

10 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.

10 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.

10 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.

10 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.

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

10 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.

10 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.

10 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

10 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.

10 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.

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

10 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