]> git.ipfire.org Git - thirdparty/dhcpcd.git/log
thirdparty/dhcpcd.git
12 years agoAs DHCPv6 can remove addresses with vltime 0 as well as a RA,
Roy Marples [Tue, 4 Jun 2013 14:53:03 +0000 (14:53 +0000)] 
As DHCPv6 can remove addresses with vltime 0 as well as a RA,
move the check into probeaddresses to save on duplication.

12 years agoFix compile on Linux
Roy Marples [Tue, 4 Jun 2013 13:41:34 +0000 (13:41 +0000)] 
Fix compile on Linux

12 years agoKeep state of delegated addresses
Roy Marples [Tue, 4 Jun 2013 13:39:02 +0000 (13:39 +0000)] 
Keep state of delegated addresses
Handle RTM_NEWADDR messages a little better
Delete addresses with pltime of 0

12 years agoAllow ia_pd 1 eth2//64
Roy Marples [Tue, 4 Jun 2013 10:42:16 +0000 (10:42 +0000)] 
Allow ia_pd 1 eth2//64

12 years agoFix ia_pd example
Roy Marples [Tue, 4 Jun 2013 10:33:25 +0000 (10:33 +0000)] 
Fix ia_pd example

12 years agoRelease dhcpcd-5.99.7 v5.99.7
Roy Marples [Tue, 4 Jun 2013 10:08:52 +0000 (10:08 +0000)] 
Release dhcpcd-5.99.7
Fix a few copyright headers

12 years agoImprove messages
Roy Marples [Mon, 3 Jun 2013 22:21:00 +0000 (22:21 +0000)] 
Improve messages

12 years agoAllow ia_pd interfaces to be specified without a SLA.
Roy Marples [Mon, 3 Jun 2013 22:02:51 +0000 (22:02 +0000)] 
Allow ia_pd interfaces to be specified without a SLA.

12 years agoStyle
Roy Marples [Mon, 3 Jun 2013 21:30:43 +0000 (21:30 +0000)] 
Style

12 years agoFix compile
Roy Marples [Mon, 3 Jun 2013 21:30:25 +0000 (21:30 +0000)] 
Fix compile

12 years agoDon't assume the kernel will remove or mark tentative LL addresses.
Roy Marples [Mon, 3 Jun 2013 06:49:34 +0000 (06:49 +0000)] 
Don't assume the kernel will remove or mark tentative LL addresses.
This isn't a problem as we listen to IPv6 address changes.

12 years agoTry and support more systems without hostname(1)
Roy Marples [Sun, 2 Jun 2013 15:18:50 +0000 (15:18 +0000)] 
Try and support more systems without hostname(1)

12 years agoFix compile on NetBSD-6
Roy Marples [Sun, 2 Jun 2013 10:54:43 +0000 (10:54 +0000)] 
Fix compile on NetBSD-6

12 years agoFix compile on FreeBSD
Roy Marples [Sun, 2 Jun 2013 10:51:20 +0000 (10:51 +0000)] 
Fix compile on FreeBSD

12 years agoAutomate the assignment of SLA ids if not given for Prefix Delegation.
Roy Marples [Sun, 2 Jun 2013 09:51:30 +0000 (09:51 +0000)] 
Automate the assignment of SLA ids if not given for Prefix Delegation.
This means you can just request an ia_pd and let dhcpcd do the rest :)

12 years agoFix testing statuses, #273
Roy Marples [Sun, 2 Jun 2013 07:12:26 +0000 (07:12 +0000)] 
Fix testing statuses, #273

12 years agoFix compiler warning
Roy Marples [Sun, 2 Jun 2013 05:38:59 +0000 (05:38 +0000)] 
Fix compiler warning

12 years agoRefactor Prefix Delegation configuration so we use integers instead
Roy Marples [Sat, 1 Jun 2013 21:30:18 +0000 (21:30 +0000)] 
Refactor Prefix Delegation configuration so we use integers instead
of hex based arrays.
The SLA can now be applied to any router given prefix length provided the
SLA can fit into the prefix and desired prefix length.
We now wait for a carrier and LL address before adding the addresses from the
delegated prefix. Before adding this code, I added some code to generate a
LL address from the hardware address. This is now #ifdef'ed out as I don't
want to throw it away in-case dhcpcd ever needs to create LL addresses
itself.

Many thanks to Martin Husemann who developed code for these functions:
ipv6_userprefix, in6_to_h64 and h64_to_in6
which are used to generate a prefix from the delegated prefix and the SLA

12 years agoFix an alignment error.
Roy Marples [Fri, 31 May 2013 15:18:52 +0000 (15:18 +0000)] 
Fix an alignment error.

12 years agoFix IPv6 DAD test
Roy Marples [Fri, 31 May 2013 15:15:28 +0000 (15:15 +0000)] 
Fix IPv6 DAD test

12 years agoBuild BOUND routes before DELEGATED ones.
Roy Marples [Fri, 31 May 2013 15:01:27 +0000 (15:01 +0000)] 
Build BOUND routes before DELEGATED ones.
Use const a little more.

12 years agoPD delegates should be on link
Roy Marples [Fri, 31 May 2013 14:44:57 +0000 (14:44 +0000)] 
PD delegates should be on link

12 years agoFix compile on Linux.
Roy Marples [Fri, 31 May 2013 14:24:46 +0000 (14:24 +0000)] 
Fix compile on Linux.

12 years agoUse PRIu32 instead of %d or %u
Roy Marples [Fri, 31 May 2013 14:14:52 +0000 (14:14 +0000)] 
Use PRIu32 instead of %d or %u

12 years agoUse ND6_INFINITE_LIFETIME instead of ~0U
Roy Marples [Fri, 31 May 2013 13:40:46 +0000 (13:40 +0000)] 
Use ND6_INFINITE_LIFETIME instead of ~0U
If we have an infinite lease, don't check expiry time when CONFIRMing

12 years agoRemove hardcoded IPv6 address flags and use a bitmask instead.
Roy Marples [Fri, 31 May 2013 13:01:54 +0000 (13:01 +0000)] 
Remove hardcoded IPv6 address flags and use a bitmask instead.
Only add delegated addresses once for each delegation.
When the kernel expires them we will see this via RTM_DELADDR and
remove the address from our list and thus the route.

12 years agoAllow options with zero data, for example Accept Reconf (20).
Roy Marples [Fri, 31 May 2013 11:53:10 +0000 (11:53 +0000)] 
Allow options with zero data, for example Accept Reconf (20).
Assume if no status option is present it is OK.
Based on an initial patch by pmarks@google.com

12 years agoIn the event DHCPv6 is started without IPv6RS, we should wait for
Roy Marples [Thu, 30 May 2013 22:39:17 +0000 (22:39 +0000)] 
In the event DHCPv6 is started without IPv6RS, we should wait for
a LL address to appear.
Also, use DH6S_INIT or DH6S_INFORM to dhcp6_start instead of 0 or
1 for clarity.

12 years agoOnly release bound states.
Roy Marples [Thu, 30 May 2013 22:21:42 +0000 (22:21 +0000)] 
Only release bound states.

12 years agoDon't assume we always have an IPv4 state.
Roy Marples [Thu, 30 May 2013 22:15:23 +0000 (22:15 +0000)] 
Don't assume we always have an IPv4 state.

12 years agoOn Linux, PPP interfaces do not have a hardware address, so
Roy Marples [Thu, 30 May 2013 21:01:48 +0000 (21:01 +0000)] 
On Linux, PPP interfaces do not have a hardware address, so
get the ifindex via if_nametoindex(3).
Also, don't record an error restoring kernel RA settings for
a removed interface.
Thanks to Sergey Fionov.

12 years agoIt's possible to receive an RA for an interface that has not yet
Roy Marples [Thu, 30 May 2013 12:07:25 +0000 (12:07 +0000)] 
It's possible to receive an RA for an interface that has not yet
obtained a local link address to send an RS.
If this happens, we should process the RA.

12 years agoSilence compiler warnings
Roy Marples [Thu, 30 May 2013 08:56:20 +0000 (08:56 +0000)] 
Silence compiler warnings

12 years agoWhen generating a duid, don't use NET/ROM interface.
Roy Marples [Thu, 30 May 2013 08:42:47 +0000 (08:42 +0000)] 
When generating a duid, don't use NET/ROM interface.
If we have no others, just create a LL address.

12 years agoUse duid_len rather than a fixed size.
Roy Marples [Thu, 30 May 2013 08:04:24 +0000 (08:04 +0000)] 
Use duid_len rather than a fixed size.

12 years agoUse LINK_UP/DOWN instead of magic numbers
Roy Marples [Thu, 30 May 2013 07:51:02 +0000 (07:51 +0000)] 
Use LINK_UP/DOWN instead of magic numbers

12 years agoMove SIOCGIFAFLAG_IN6 into if-bsd as in6_addr_flags
Roy Marples [Thu, 30 May 2013 05:38:21 +0000 (05:38 +0000)] 
Move SIOCGIFAFLAG_IN6 into if-bsd as in6_addr_flags
Add pfx_flush to flush ND6 entries when changing routes.
Both these functions only work for BSD, just stubs on Linux.

This tidies the code a little and fixes changing IPv6 routes on BSD,
although the kernel may complain network is down for a few moments.

12 years agoFix DAD for delegated addresses.
Roy Marples [Wed, 29 May 2013 12:59:47 +0000 (12:59 +0000)] 
Fix DAD for delegated addresses.

12 years agoComment on why we don't solicit dhcpv6 without an RA to instruct us.
Roy Marples [Fri, 24 May 2013 09:08:23 +0000 (09:08 +0000)] 
Comment on why we don't solicit dhcpv6 without an RA to instruct us.

12 years agoOptimise adding and changing ipv6 routes.
Roy Marples [Fri, 24 May 2013 08:06:57 +0000 (08:06 +0000)] 
Optimise adding and changing ipv6 routes.

12 years agoOnly spam syslog if something new or unexpected happens, don't spam
Roy Marples [Thu, 23 May 2013 21:50:34 +0000 (21:50 +0000)] 
Only spam syslog if something new or unexpected happens, don't spam
it if we just maintain the status quo.

12 years agoDon't directly close stderr
Roy Marples [Thu, 23 May 2013 18:58:28 +0000 (18:58 +0000)] 
Don't directly close stderr

12 years agoRationalise last patch
Roy Marples [Thu, 23 May 2013 16:28:10 +0000 (16:28 +0000)] 
Rationalise last patch

12 years agoControl requested ivp4 routes and ignore pre-existing static ones.
Roy Marples [Thu, 23 May 2013 16:22:51 +0000 (16:22 +0000)] 
Control requested ivp4 routes and ignore pre-existing static ones.

12 years agoFreeBSD isn't buggy with adding new addresses and working out
Roy Marples [Thu, 23 May 2013 09:55:52 +0000 (09:55 +0000)] 
FreeBSD isn't buggy with adding new addresses and working out
if they are new and should be tentative - it was my buggy configuraion
when I upgraded from FreeBSD 8 -> 9.

12 years agoWarn about the difference between CSR and MS CSR.
Roy Marples [Thu, 23 May 2013 09:48:28 +0000 (09:48 +0000)] 
Warn about the difference between CSR and MS CSR.
Fixed #254.

12 years agoFix non FreeBSD compiles
Roy Marples [Thu, 23 May 2013 08:17:00 +0000 (08:17 +0000)] 
Fix non FreeBSD compiles

12 years agoRemove some const const warnings found by clang.
Roy Marples [Wed, 22 May 2013 22:58:15 +0000 (22:58 +0000)] 
Remove some const const warnings found by clang.

12 years agoHandle an interface coming and going better with a tailq list.
Roy Marples [Wed, 22 May 2013 22:55:36 +0000 (22:55 +0000)] 
Handle an interface coming and going better with a tailq list.
Ensure we check correct options when building ipv6 routes.

12 years agoFix compile on FreeBSD
Roy Marples [Wed, 22 May 2013 18:16:32 +0000 (18:16 +0000)] 
Fix compile on FreeBSD
Document why we don't set IN6_IFF_TENTATIVE when adding addresses
and a possible error on FreeBSD.

12 years agoFix removal of addresses
Roy Marples [Wed, 22 May 2013 08:11:47 +0000 (08:11 +0000)] 
Fix removal of addresses

12 years agoRemove unreachable routers on Linux unless all routers are unreachable.
Roy Marples [Wed, 22 May 2013 08:11:13 +0000 (08:11 +0000)] 
Remove unreachable routers on Linux unless all routers are unreachable.
This is due to route metrics.

12 years agoRemove more headers
Roy Marples [Tue, 21 May 2013 16:05:36 +0000 (16:05 +0000)] 
Remove more headers

12 years agoRemove includes to try and fix ppc 64 linux compile.
Roy Marples [Tue, 21 May 2013 15:38:52 +0000 (15:38 +0000)] 
Remove includes to try and fix ppc 64 linux compile.

12 years agoAdd timeout desc for 0
Roy Marples [Tue, 21 May 2013 13:47:38 +0000 (13:47 +0000)] 
Add timeout desc for 0

12 years agoRemove include to try and fix ppc 64 linux compile.
Roy Marples [Tue, 21 May 2013 13:25:37 +0000 (13:25 +0000)] 
Remove include to try and fix ppc 64 linux compile.

12 years agoDon't warn about invalid xid if we're already bound.
Roy Marples [Tue, 21 May 2013 12:34:06 +0000 (12:34 +0000)] 
Don't warn about invalid xid if we're already bound.

12 years agoDon't actually remove unreachable routers and prefixes from the routing table.
Roy Marples [Tue, 21 May 2013 09:24:49 +0000 (09:24 +0000)] 
Don't actually remove unreachable routers and prefixes from the routing table.
Instead we just change the interface if they are reachable via another one.

12 years agoUse macros instead of memcmp
Roy Marples [Sat, 18 May 2013 15:37:27 +0000 (15:37 +0000)] 
Use macros instead of memcmp

12 years agoGet local link address flags for supported OS's.
Roy Marples [Sat, 18 May 2013 15:30:55 +0000 (15:30 +0000)] 
Get local link address flags for supported OS's.
Just in-case they are tentative.

12 years agoFix an alignment error
Roy Marples [Fri, 17 May 2013 23:24:07 +0000 (23:24 +0000)] 
Fix an alignment error

12 years agoFix logic
Roy Marples [Fri, 17 May 2013 23:21:56 +0000 (23:21 +0000)] 
Fix logic

12 years agoDon't log an error when deleting IPv6 addresses that doesn't exist.
Roy Marples [Fri, 17 May 2013 23:17:44 +0000 (23:17 +0000)] 
Don't log an error when deleting IPv6 addresses that doesn't exist.

12 years agoStore IPv6 link local addresses per interface.
Roy Marples [Fri, 17 May 2013 23:09:36 +0000 (23:09 +0000)] 
Store IPv6 link local addresses per interface.
Listen to kernel messages to account them.
If we don't have a local link address, delay IPv6RS as it just
won#t work until we have a local link address.

12 years agoShorten executing message to avoid oerflowing 80 chars
Roy Marples [Fri, 17 May 2013 07:50:51 +0000 (07:50 +0000)] 
Shorten executing message to avoid oerflowing 80 chars

12 years agoSet scope for DHCPv6
Roy Marples [Thu, 16 May 2013 19:02:14 +0000 (19:02 +0000)] 
Set scope for DHCPv6

12 years agoIgnore emacs files
Roy Marples [Thu, 16 May 2013 18:52:23 +0000 (18:52 +0000)] 
Ignore emacs files

12 years agoSet scope_id correctly.
Roy Marples [Thu, 16 May 2013 16:29:54 +0000 (16:29 +0000)] 
Set scope_id correctly.

12 years agoELOOP_QUEUE 0 is now all queues
Roy Marples [Thu, 16 May 2013 14:42:18 +0000 (14:42 +0000)] 
ELOOP_QUEUE 0 is now all queues
This allows DHCPv6 and IPv6RS to remove DAD callbacks from the IPv6NS queue.

12 years agoTest BSD kernels for a specific version so we can listen to either
Roy Marples [Thu, 16 May 2013 14:28:42 +0000 (14:28 +0000)] 
Test BSD kernels for a specific version so we can listen to either
RTM_NEWADDR for duplicates, or directly on the wire with a maximum
timeout.

Warn about this noisily as there is no reason why the kernel cannot be
easily patched to support this.

12 years agoFix RA router ordering
Roy Marples [Thu, 16 May 2013 13:30:06 +0000 (13:30 +0000)] 
Fix RA router ordering

12 years agoWhen dropping states, delete any timeouts for DAD callbacks.
Roy Marples [Thu, 16 May 2013 13:09:27 +0000 (13:09 +0000)] 
When dropping states, delete any timeouts for DAD callbacks.

12 years agoFix compile on Linux
Roy Marples [Thu, 16 May 2013 10:54:20 +0000 (10:54 +0000)] 
Fix compile on Linux

12 years agoFix compile on FreeBSD
Roy Marples [Thu, 16 May 2013 10:48:03 +0000 (10:48 +0000)] 
Fix compile on FreeBSD

12 years agoMove DAD messages to LOG_INFO.
Roy Marples [Thu, 16 May 2013 10:36:08 +0000 (10:36 +0000)] 
Move DAD messages to LOG_INFO.

12 years agoCheck address flags for tentative and duplicates bits for sanity.
Roy Marples [Thu, 16 May 2013 10:31:21 +0000 (10:31 +0000)] 
Check address flags for tentative and duplicates bits for sanity.
Handle the actual trigger to callout dhcpcd-run-hooks in the DAD callback
instead of on receipt of RTM_NEWADDR directly. This is more code, but it allows
us to use our own DAD engine if we need to.

12 years agoRemoved unused vars
Roy Marples [Wed, 15 May 2013 23:56:24 +0000 (23:56 +0000)] 
Removed unused vars

12 years agoFix compile on FreeBSD
Roy Marples [Wed, 15 May 2013 11:34:17 +0000 (11:34 +0000)] 
Fix compile on FreeBSD

12 years agoAdd netlink code to listen to AF_INET6 RTM_NEWADDR messages for Linux. v5.99.6
Roy Marples [Wed, 15 May 2013 11:17:36 +0000 (11:17 +0000)] 
Add netlink code to listen to AF_INET6 RTM_NEWADDR messages for Linux.

12 years agoUse the kernel DAD for IPv6 addresses and finish the action once each
Roy Marples [Wed, 15 May 2013 10:27:36 +0000 (10:27 +0000)] 
Use the kernel DAD for IPv6 addresses and finish the action once each
address DAD completes. BSD kernels will require a patch as noted within
the README. The linux netlink part still needs to be written.

12 years agoMore compile fixes.
Roy Marples [Fri, 3 May 2013 14:43:51 +0000 (14:43 +0000)] 
More compile fixes.

12 years agoMore PPC __unused compile fixes.
Roy Marples [Fri, 3 May 2013 14:41:19 +0000 (14:41 +0000)] 
More PPC __unused compile fixes.

12 years agoFix syslogging a little.
Roy Marples [Fri, 3 May 2013 14:19:17 +0000 (14:19 +0000)] 
Fix syslogging a little.

12 years agoInit memory cleanly.
Roy Marples [Fri, 3 May 2013 14:17:24 +0000 (14:17 +0000)] 
Init memory cleanly.

12 years agoAdd new hook script.
Roy Marples [Fri, 3 May 2013 13:45:21 +0000 (13:45 +0000)] 
Add new hook script.

12 years agoAdd RFC4833 support for TimeZone options.
Roy Marples [Fri, 3 May 2013 13:38:54 +0000 (13:38 +0000)] 
Add RFC4833 support for TimeZone options.

12 years agoAdd IPv6 DAD detection.
Roy Marples [Fri, 3 May 2013 12:11:49 +0000 (12:11 +0000)] 
Add IPv6 DAD detection.

Sadly, it seems that userland cannot send from the unspecified address.
This means that for RFC conformancy, we have to rely on the kernel
performing DAD.

12 years agoWork around silly __unused problem some more on Linux.
Roy Marples [Thu, 25 Apr 2013 06:09:38 +0000 (06:09 +0000)] 
Work around silly __unused problem some more on Linux.

12 years agoChange from _unused to __unused to match NetBSD cdefs and avoid
Roy Marples [Wed, 24 Apr 2013 09:38:18 +0000 (09:38 +0000)] 
Change from _unused to __unused to match NetBSD cdefs and avoid
a compiler failure on linux-headers-3.7

12 years agoNote that reboot 0 helps for mobile hosts.
Roy Marples [Fri, 5 Apr 2013 16:40:31 +0000 (16:40 +0000)] 
Note that reboot 0 helps for mobile hosts.

12 years agoDHCPv6 now respects the reboot 0 option.
Roy Marples [Fri, 5 Apr 2013 14:55:50 +0000 (14:55 +0000)] 
DHCPv6 now respects the reboot 0 option.

12 years agoNote that we support RFC 5227
Roy Marples [Fri, 5 Apr 2013 09:47:33 +0000 (09:47 +0000)] 
Note that we support RFC 5227

12 years agoWe no longer use the RELEASE hook command
Roy Marples [Fri, 5 Apr 2013 00:09:16 +0000 (00:09 +0000)] 
We no longer use the RELEASE hook command

12 years agoMove dhcp_release into dhcp_drop
Roy Marples [Thu, 4 Apr 2013 23:57:12 +0000 (23:57 +0000)] 
Move dhcp_release into dhcp_drop

12 years agoSend a RELEASE if the link is up
Roy Marples [Thu, 4 Apr 2013 23:30:14 +0000 (23:30 +0000)] 
Send a RELEASE if the link is up

12 years agoDestroy lease file if releasing.
Roy Marples [Thu, 4 Apr 2013 23:29:54 +0000 (23:29 +0000)] 
Destroy lease file if releasing.

12 years agoDon't crash when disabling IPv6
Roy Marples [Thu, 4 Apr 2013 23:25:31 +0000 (23:25 +0000)] 
Don't crash when disabling IPv6

12 years agoFix a memory leak
Roy Marples [Thu, 4 Apr 2013 22:07:48 +0000 (22:07 +0000)] 
Fix a memory leak

12 years agoAdd RELEASE support to DHCPv6
Roy Marples [Thu, 4 Apr 2013 21:59:02 +0000 (21:59 +0000)] 
Add RELEASE support to DHCPv6

12 years agoFix RELEASE support.
Roy Marples [Thu, 4 Apr 2013 21:58:51 +0000 (21:58 +0000)] 
Fix RELEASE support.