]> git.ipfire.org Git - thirdparty/dhcpcd.git/log
thirdparty/dhcpcd.git
8 years agoTidy comments
Roy Marples [Tue, 27 Sep 2016 08:57:43 +0000 (08:57 +0000)] 
Tidy comments

8 years agoAllow IPv4LL to be compiled out.
Roy Marples [Tue, 20 Sep 2016 09:29:39 +0000 (09:29 +0000)] 
Allow IPv4LL to be compiled out.

8 years agoNeed to include crypt for MD5 on Linux.
Roy Marples [Mon, 19 Sep 2016 19:03:25 +0000 (19:03 +0000)] 
Need to include crypt for MD5 on Linux.

8 years agoRemove extra comment
Roy Marples [Mon, 19 Sep 2016 19:00:26 +0000 (19:00 +0000)] 
Remove extra comment

8 years agoAdd CAN_DROP_LLADDR so we can easily handle our current inability to remove the IPv6...
Roy Marples [Mon, 19 Sep 2016 17:51:04 +0000 (17:51 +0000)] 
Add CAN_DROP_LLADDR so we can easily handle our current inability to remove the IPv6 LL address on Solaris

8 years agoFix setting IPv6 addresses to zero.
Roy Marples [Mon, 19 Sep 2016 16:16:47 +0000 (16:16 +0000)] 
Fix setting IPv6 addresses to zero.

8 years agoFix a segfault.
Roy Marples [Mon, 19 Sep 2016 15:41:14 +0000 (15:41 +0000)] 
Fix a segfault.

8 years agoMake import now imports the files needed to generate dhcpcd-embedded.{c,h}
Roy Marples [Mon, 19 Sep 2016 13:00:45 +0000 (13:00 +0000)] 
Make import now imports the files needed to generate dhcpcd-embedded.{c,h}
and bundles a small definition.

8 years agoFix building of embedded config with correct specified source.
Roy Marples [Mon, 19 Sep 2016 12:25:39 +0000 (12:25 +0000)] 
Fix building of embedded config with correct specified source.
Update copyrights.

8 years agoAllow dhcpcd to be built without Authentiction support for system media with
Roy Marples [Mon, 19 Sep 2016 09:08:11 +0000 (09:08 +0000)] 
Allow dhcpcd to be built without Authentiction support for system media with
extreme size constraints.

8 years agoFix compile on Linux
Roy Marples [Fri, 16 Sep 2016 19:41:05 +0000 (19:41 +0000)] 
Fix compile on Linux

8 years agoifa_msghdr does not have the alias it's for, which is bad.
Roy Marples [Fri, 16 Sep 2016 19:38:30 +0000 (19:38 +0000)] 
ifa_msghdr does not have the alias it's for, which is bad.
This hack works around it, but it's not 100% accurate :/

8 years agoSMALL target removes the custom logger.
Roy Marples [Fri, 16 Sep 2016 16:21:17 +0000 (16:21 +0000)] 
SMALL target removes the custom logger.

8 years agoFix compile on OpenBSD.
Roy Marples [Fri, 16 Sep 2016 16:03:00 +0000 (16:03 +0000)] 
Fix compile on OpenBSD.

8 years agoOne BSD in the future will include address flags in ifa_msghdr.
Roy Marples [Fri, 16 Sep 2016 15:49:01 +0000 (15:49 +0000)] 
One BSD in the future will include address flags in ifa_msghdr.
A libc in the future will include address flags in ifaddrs.
Although this does make the code a bit more #ifdef messy, the end result
is a smaller binary, and less ioctls to make.

8 years agoWhen validating a lease with an OK but no IA's and in the CONFIRM phase
Roy Marples [Fri, 16 Sep 2016 15:28:46 +0000 (15:28 +0000)] 
When validating a lease with an OK but no IA's and in the CONFIRM phase
then look for IA's in the old lease.
This allows us to get correct expiry and rebind times from old lease but
based from the acquision time of the CONFIRM message.

8 years agoIgnore RTM versions we don't know.
Roy Marples [Thu, 15 Sep 2016 10:36:58 +0000 (10:36 +0000)] 
Ignore RTM versions we don't know.

8 years agoSolaris allows a route per gateway as well.
Roy Marples [Mon, 12 Sep 2016 16:03:19 +0000 (16:03 +0000)] 
Solaris allows a route per gateway as well.

8 years agodhcpcd considers the link down without IFF_UP.
Roy Marples [Mon, 12 Sep 2016 16:02:40 +0000 (16:02 +0000)] 
dhcpcd considers the link down without IFF_UP.

8 years agoOpenBSD allows many routes to the same dest with different gateways.
Roy Marples [Mon, 12 Sep 2016 10:58:32 +0000 (10:58 +0000)] 
OpenBSD allows many routes to the same dest with different gateways.
dhcpcd does not support this yet, so just delete the route until there is an error.
Fixes [ad8b5130d4].

8 years agoAdd the --small configure option which currently removes non essential options
Roy Marples [Fri, 9 Sep 2016 09:56:26 +0000 (09:56 +0000)] 
Add the --small configure option which currently removes non essential options
from being parsed out into dhcpcd-run-hooks and removes support for
DHCPv6 Prefix Delegation.
This is mainly to build a tiny dhcpcd for install media size there are more
extreme space limitations.

8 years agoAlways roundup the required buffer.
Roy Marples [Tue, 6 Sep 2016 16:39:03 +0000 (16:39 +0000)] 
Always roundup the required buffer.

8 years agoMore assert
Roy Marples [Tue, 6 Sep 2016 16:14:31 +0000 (16:14 +0000)] 
More assert

8 years agoDon't dispatch 0 bytes.
Roy Marples [Tue, 6 Sep 2016 14:58:33 +0000 (14:58 +0000)] 
Don't dispatch 0 bytes.

8 years agoWhen receiving multipart messages, receive them again until we get NLMSG_DONE.
Roy Marples [Tue, 6 Sep 2016 13:46:12 +0000 (13:46 +0000)] 
When receiving multipart messages, receive them again until we get NLMSG_DONE.

8 years agoDragonFly needs to ingore RTM_DELADDR as well.
Roy Marples [Tue, 6 Sep 2016 12:05:55 +0000 (12:05 +0000)] 
DragonFly needs to ingore RTM_DELADDR as well.

8 years agoRemove the POLLADDR check out of if-bsd.c and into ipv6.c for other OS's
Roy Marples [Tue, 6 Sep 2016 10:43:49 +0000 (10:43 +0000)] 
Remove the POLLADDR check out of if-bsd.c and into ipv6.c for other OS's

8 years agoRename var to avoid a global on OpenBSD.
Roy Marples [Tue, 6 Sep 2016 10:03:08 +0000 (10:03 +0000)] 
Rename var to avoid a global on OpenBSD.

8 years agoMore iovec array fixes.
Roy Marples [Mon, 5 Sep 2016 22:48:08 +0000 (22:48 +0000)] 
More iovec array fixes.

8 years agoFix more iovec to arrays.
Roy Marples [Mon, 5 Sep 2016 22:35:29 +0000 (22:35 +0000)] 
Fix more iovec to arrays.

8 years agorecvmsg expects an array of iovec structures, not a pointer to the first one.
Roy Marples [Mon, 5 Sep 2016 22:27:47 +0000 (22:27 +0000)] 
recvmsg expects an array of iovec structures, not a pointer to the first one.

8 years agoRe-check address flags when carrier goes down if we poll for address flags.
Roy Marples [Mon, 5 Sep 2016 21:20:14 +0000 (21:20 +0000)] 
Re-check address flags when carrier goes down if we poll for address flags.

8 years agoIf we need to poll for address flags, do this for tentative link-local addresses...
Roy Marples [Mon, 5 Sep 2016 21:19:29 +0000 (21:19 +0000)] 
If we need to poll for address flags, do this for tentative link-local addresses too.

8 years agoDodge more errors when deleting not available anymore.
Roy Marples [Mon, 5 Sep 2016 20:11:44 +0000 (20:11 +0000)] 
Dodge more errors when deleting not available anymore.

8 years agoDon't violate memory when we learn new IPv4LL addresses.
Roy Marples [Mon, 5 Sep 2016 20:08:46 +0000 (20:08 +0000)] 
Don't violate memory when we learn new IPv4LL addresses.

8 years agoWe need a seperate iovec buffer for receiving netlink messages because
Roy Marples [Mon, 5 Sep 2016 20:08:15 +0000 (20:08 +0000)] 
We need a seperate iovec buffer for receiving netlink messages because
we need to send and receive before the first receive has finished.

8 years agoOnly callback when there is a callback.
Roy Marples [Mon, 5 Sep 2016 19:43:14 +0000 (19:43 +0000)] 
Only callback when there is a callback.

8 years agoHandle NLMSG_NOOP and NLMSG_DONE.
Roy Marples [Mon, 5 Sep 2016 19:39:42 +0000 (19:39 +0000)] 
Handle NLMSG_NOOP and NLMSG_DONE.
Move err_netlink to here as well to clarify.

8 years agoEnsure that the IPv6 link-local address always uses the secret key at startup.
Roy Marples [Mon, 5 Sep 2016 15:57:30 +0000 (15:57 +0000)] 
Ensure that the IPv6 link-local address always uses the secret key at startup.

8 years agoRemove IPv4 routes in reverse order to match IPv6.
Roy Marples [Sat, 3 Sep 2016 12:23:03 +0000 (12:23 +0000)] 
Remove IPv4 routes in reverse order to match IPv6.
Thanks to Guy Yur.

8 years agoTest slen is not -1 before setting error on MSG_TRUNC.
Roy Marples [Fri, 2 Sep 2016 14:29:54 +0000 (14:29 +0000)] 
Test slen is not -1 before setting error on MSG_TRUNC.

8 years agoDon't call snprintf needlessly.
Roy Marples [Fri, 2 Sep 2016 14:02:45 +0000 (14:02 +0000)] 
Don't call snprintf needlessly.

8 years agoCheck valid netmask changes.
Roy Marples [Fri, 2 Sep 2016 13:57:42 +0000 (13:57 +0000)] 
Check valid netmask changes.

8 years agoDon't add host routes for the IPv4LL default route.
Roy Marples [Fri, 2 Sep 2016 13:37:07 +0000 (13:37 +0000)] 
Don't add host routes for the IPv4LL default route.

8 years agoWhen deleting routes, delete the stored kernel route as well.
Roy Marples [Fri, 2 Sep 2016 13:10:39 +0000 (13:10 +0000)] 
When deleting routes, delete the stored kernel route as well.
This enables IPv4LL default routes to be re-added if a DHCP lease expires.

8 years agoOnly log errors about getting address flags if the error is not address
Roy Marples [Fri, 2 Sep 2016 12:36:33 +0000 (12:36 +0000)] 
Only log errors about getting address flags if the error is not address
unavailable.

8 years agoRemove the need for statically sized receive buffers for IPv6 ND and DHCPv6
Roy Marples [Fri, 2 Sep 2016 11:34:09 +0000 (11:34 +0000)] 
Remove the need for statically sized receive buffers for IPv6 ND and DHCPv6
messages.

8 years agoProvide better commentary.
Roy Marples [Fri, 2 Sep 2016 10:42:09 +0000 (10:42 +0000)] 
Provide better commentary.

8 years agoOptimise recvmsg_realloc.
Roy Marples [Fri, 2 Sep 2016 10:20:30 +0000 (10:20 +0000)] 
Optimise recvmsg_realloc.

8 years agobytes -> len
Roy Marples [Fri, 2 Sep 2016 09:01:21 +0000 (09:01 +0000)] 
bytes -> len

8 years agoIf more than one iovec then realloc the last one.
Roy Marples [Fri, 2 Sep 2016 08:16:31 +0000 (08:16 +0000)] 
If more than one iovec then realloc the last one.

8 years agoRework the recvmsg_realloc function to handle flags.
Roy Marples [Fri, 2 Sep 2016 08:09:47 +0000 (08:09 +0000)] 
Rework the recvmsg_realloc function to handle flags.

Commit also includes mistakenly added ifam_pid patch for BSD.
It does no harm being here, even though no BSD supports this yet.

8 years agoUse recvmsg_alloc on Solaris too.
Roy Marples [Thu, 1 Sep 2016 17:12:37 +0000 (17:12 +0000)] 
Use recvmsg_alloc on Solaris too.

8 years agoLinux now uses recvmsg_alloc as well, reducing duplicated code.
Roy Marples [Thu, 1 Sep 2016 17:01:26 +0000 (17:01 +0000)] 
Linux now uses recvmsg_alloc as well, reducing duplicated code.

8 years agoRemove debug added accidently in last commit.
Roy Marples [Thu, 1 Sep 2016 14:50:28 +0000 (14:50 +0000)] 
Remove debug added accidently in last commit.

8 years agoUse a dynamically sized buffer for reading route(4) messages on BSD
Roy Marples [Thu, 1 Sep 2016 14:37:48 +0000 (14:37 +0000)] 
Use a dynamically sized buffer for reading route(4) messages on BSD
instead of a fixed 2048 byte buffer.

8 years agoFreeBSD emits RTM_DELADDR for INET addresses that still exit,
Roy Marples [Thu, 1 Sep 2016 13:17:07 +0000 (13:17 +0000)] 
FreeBSD emits RTM_DELADDR for INET addresses that still exit,
for example when dowing the interface.
This is totally bogus, so we ignore it.

While here, only set LINK_UP for RTM_IFINFO messges when IFF_UP is also set.

This should fix dhcpcd working on FreeBSD when downing interfaces and
link is lost.

8 years agoClear LL callbacks when dropping or freeing addresses.
Roy Marples [Thu, 1 Sep 2016 11:48:21 +0000 (11:48 +0000)] 
Clear LL callbacks when dropping or freeing addresses.

8 years agoFix a dropping leases when the ip address is removed by a 3rd party.
Roy Marples [Thu, 1 Sep 2016 11:46:51 +0000 (11:46 +0000)] 
Fix a dropping leases when the ip address is removed by a 3rd party.

8 years agoFix processing of hex and octal strings.
Roy Marples [Wed, 24 Aug 2016 19:32:41 +0000 (19:32 +0000)] 
Fix processing of hex and octal strings.

8 years agoOpenBSD does not refresh address lifetimes on subsequent calls.
Roy Marples [Mon, 22 Aug 2016 19:52:11 +0000 (19:52 +0000)] 
OpenBSD does not refresh address lifetimes on subsequent calls.
Luckily dhcpcd will expire the address regardless, so just se
infinite lifetimes, except for privacy addresses.
Fixes [277e6848da].

8 years agoStop setting RA override becuse it only makes sense when we want the kernel
Roy Marples [Thu, 18 Aug 2016 14:38:49 +0000 (14:38 +0000)] 
Stop setting RA override becuse it only makes sense when we want the kernel
to listen to RA's which we don't want.

8 years agoCheck if we loaded options or not.
Roy Marples [Thu, 18 Aug 2016 14:37:53 +0000 (14:37 +0000)] 
Check if we loaded options or not.

8 years agoOnly stop_interface() if it's active instead of checking if options exist.
Roy Marples [Thu, 18 Aug 2016 11:28:16 +0000 (11:28 +0000)] 
Only stop_interface() if it's active instead of checking if options exist.
Thanks to Koichi Okamoto.

8 years agoNote that the IPv6 address lifetime issue is now fixed in NetBSD.
Roy Marples [Tue, 16 Aug 2016 16:27:02 +0000 (16:27 +0000)] 
Note that the IPv6 address lifetime issue is now fixed in NetBSD.

8 years agoFix formatting.
Roy Marples [Mon, 15 Aug 2016 10:53:49 +0000 (10:53 +0000)] 
Fix formatting.

8 years agoRelease dhcpcd-6.11.3 v6.11.3
Roy Marples [Mon, 15 Aug 2016 10:34:22 +0000 (10:34 +0000)] 
Release dhcpcd-6.11.3

8 years agoEnsure we have an active interface (which we always will).
Roy Marples [Sun, 14 Aug 2016 09:06:41 +0000 (09:06 +0000)] 
Ensure we have an active interface (which we always will).

8 years agoBind to the local-link address rather than directly to the interface to allow
Roy Marples [Sun, 14 Aug 2016 08:51:19 +0000 (08:51 +0000)] 
Bind to the local-link address rather than directly to the interface to allow
many DHCPv6 clients on many interfaces.
This works on all platforms.

8 years agoIf not running in master mode, allow dhcpcd to bind directly to the interface
Roy Marples [Sun, 14 Aug 2016 08:30:13 +0000 (08:30 +0000)] 
If not running in master mode, allow dhcpcd to bind directly to the interface
for DHCPv6. This allows more than once dhcpcd instance to work with DHCPv6.

8 years agoWe no longer need this as we don't alias anymore.
Roy Marples [Sun, 14 Aug 2016 08:25:32 +0000 (08:25 +0000)] 
We no longer need this as we don't alias anymore.

8 years agoEnsure offer_len is 0 after making offer NULL.
Roy Marples [Sat, 13 Aug 2016 15:11:10 +0000 (15:11 +0000)] 
Ensure offer_len is 0 after making offer NULL.
Set offer_len before each memcpy to aid debugging.

8 years agoOnly mask off the signals we are interested in catching.
Roy Marples [Fri, 12 Aug 2016 16:34:01 +0000 (16:34 +0000)] 
Only mask off the signals we are interested in catching.

9 years agoAdd more notes about BSD OS issues with prefix lifetimes.
Roy Marples [Sun, 7 Aug 2016 21:06:39 +0000 (21:06 +0000)] 
Add more notes about BSD OS issues with prefix lifetimes.

9 years agoSet route flags for IPv6 routes, allowing RTF_REJECT to work again.
Roy Marples [Sun, 7 Aug 2016 20:47:57 +0000 (20:47 +0000)] 
Set route flags for IPv6 routes, allowing RTF_REJECT to work again.
Thanks to Guy Yur.

9 years agoFix the gateway to the route interface for IPv6 routes.
Roy Marples [Sat, 6 Aug 2016 23:00:50 +0000 (23:00 +0000)] 
Fix the gateway to the route interface for IPv6 routes.
Thanks to Guy Yur.

9 years agoNote that the prior issue was fixed in OpenBSD-5.9
Roy Marples [Fri, 5 Aug 2016 12:56:02 +0000 (12:56 +0000)] 
Note that the prior issue was fixed in OpenBSD-5.9

9 years agoWorkaround an issue on BSD where the kernel pretends a freshly added address is from...
Roy Marples [Fri, 5 Aug 2016 09:41:51 +0000 (09:41 +0000)] 
Workaround an issue on BSD where the kernel pretends a freshly added address is from a RA and uses it's liftetime for the prefix route.
See comments in the changeset for more details.

9 years agoExpire IPv6 RA Prefix routes.
Roy Marples [Wed, 3 Aug 2016 20:38:31 +0000 (20:38 +0000)] 
Expire IPv6 RA Prefix routes.

9 years agoChange wording on non dhcpcd removed addresses and routes.
Roy Marples [Wed, 3 Aug 2016 20:31:09 +0000 (20:31 +0000)] 
Change wording on non dhcpcd removed addresses and routes.

9 years agoRelease dhcpcd-6.11.2 v6.11.2
Roy Marples [Fri, 29 Jul 2016 09:35:48 +0000 (09:35 +0000)] 
Release dhcpcd-6.11.2

9 years agoWhen deactivating an interface, set the carrier to unknown as it's no longer being...
Roy Marples [Thu, 28 Jul 2016 13:10:20 +0000 (13:10 +0000)] 
When deactivating an interface, set the carrier to unknown as it's no longer being tracked.
Thanks to Koichi Okamoto.

9 years agoEnsure sockaddrs are zero's correctly.
Roy Marples [Thu, 28 Jul 2016 10:58:22 +0000 (10:58 +0000)] 
Ensure sockaddrs are zero's correctly.

9 years agoSimplify BSD routing by having a common function to make the message
Roy Marples [Thu, 28 Jul 2016 10:51:36 +0000 (10:51 +0000)] 
Simplify BSD routing by having a common function to make the message
and the IP specific routines just generating the sockaddrs and flags.

9 years agoAllow resolvconf to be user tunable.
Roy Marples [Thu, 28 Jul 2016 10:02:42 +0000 (10:02 +0000)] 
Allow resolvconf to be user tunable.

9 years agoAdd --inactive which makes all interfaces inactive on initial start.
Roy Marples [Wed, 27 Jul 2016 16:47:34 +0000 (16:47 +0000)] 
Add --inactive which makes all interfaces inactive on initial start.
Subsequent dhcpcd commands will start each interface.

9 years agoAdd some commentary for ALIAS_ADDR remove and unused define.
Roy Marples [Wed, 27 Jul 2016 15:46:53 +0000 (15:46 +0000)] 
Add some commentary for ALIAS_ADDR remove and unused define.

9 years agoWhen aliasing to an existing address, check it is already aliased.
Roy Marples [Wed, 27 Jul 2016 15:39:29 +0000 (15:39 +0000)] 
When aliasing to an existing address, check it is already aliased.
Add debug to say which alias will use the address.
Fixes Solaris.

9 years agoAlways check if_addrflags{,6}() error of -1.
Roy Marples [Wed, 27 Jul 2016 08:55:42 +0000 (08:55 +0000)] 
Always check if_addrflags{,6}() error of -1.
While here, fix compile on OpenBSD.

9 years agoFix compile
Roy Marples [Wed, 27 Jul 2016 08:09:34 +0000 (08:09 +0000)] 
Fix compile

9 years agoFix expiration of a single default router with static routes.
Roy Marples [Wed, 27 Jul 2016 05:29:09 +0000 (05:29 +0000)] 
Fix expiration of a single default router with static routes.

9 years agoFix aliasing on Solaris.
Roy Marples [Wed, 27 Jul 2016 04:59:32 +0000 (04:59 +0000)] 
Fix aliasing on Solaris.

9 years ago#undef RTF_CLONING for Solaris in if.h so it's picked up everywhere.
Roy Marples [Wed, 27 Jul 2016 04:11:00 +0000 (04:11 +0000)] 
#undef RTF_CLONING for Solaris in if.h so it's picked up everywhere.

9 years agoSolaris can disable LL generation, so we can add our own view.
Roy Marples [Wed, 27 Jul 2016 03:57:52 +0000 (03:57 +0000)] 
Solaris can disable LL generation, so we can add our own view.

9 years agoJuggle #define ordering.
Roy Marples [Wed, 27 Jul 2016 03:54:22 +0000 (03:54 +0000)] 
Juggle #define ordering.
Note that Solaris does not support routes from the ip address to localhost.

9 years agoSync Solaris driver to latest API.
Roy Marples [Tue, 26 Jul 2016 21:18:03 +0000 (21:18 +0000)] 
Sync Solaris driver to latest API.
Simplify generating route messages and address management.
As of now, this should mostly work :)

9 years agoSolaris doesn't really have a machine/arch afaik.
Roy Marples [Tue, 26 Jul 2016 21:11:32 +0000 (21:11 +0000)] 
Solaris doesn't really have a machine/arch afaik.

9 years agoRemove Solaris IN6_IFF_* defines from configure and add the to ipv6.h,
Roy Marples [Tue, 26 Jul 2016 21:09:35 +0000 (21:09 +0000)] 
Remove Solaris IN6_IFF_* defines from configure and add the to ipv6.h,
similar to Linux.
While here, add IN_IFF_* counter-parts in ipv4.h.

9 years agoFix a crash accidently introduced prior patch.
Roy Marples [Tue, 26 Jul 2016 21:05:18 +0000 (21:05 +0000)] 
Fix a crash accidently introduced prior patch.

9 years agoFix compile on BSD.
Roy Marples [Tue, 26 Jul 2016 20:55:42 +0000 (20:55 +0000)] 
Fix compile on BSD.