]> git.ipfire.org Git - thirdparty/dhcpcd.git/log
thirdparty/dhcpcd.git
12 years agoThe loopback route should also use the metric.
Roy Marples [Wed, 19 Jun 2013 16:32:22 +0000 (16:32 +0000)] 
The loopback route should also use the metric.

12 years agoAdd loopback support for Linux.
Roy Marples [Wed, 19 Jun 2013 16:11:31 +0000 (16:11 +0000)] 
Add loopback support for Linux.

12 years agoAdd a route from the IPv4 address to the loopback address.
Roy Marples [Wed, 19 Jun 2013 16:02:19 +0000 (16:02 +0000)] 
Add a route from the IPv4 address to the loopback address.
This allows for machine-internal communications to this address
can use the large loopback mtu.

12 years agoNote that ipv6ra_own doesn't work well on any BSD system.
Roy Marples [Wed, 19 Jun 2013 13:35:28 +0000 (13:35 +0000)] 
Note that ipv6ra_own doesn't work well on any BSD system.

12 years agoArrived interfaces should share the same commandline options.
Roy Marples [Wed, 19 Jun 2013 10:06:54 +0000 (10:06 +0000)] 
Arrived interfaces should share the same commandline options.

12 years agoReduce the buggy PPP wait to 1 second.
Roy Marples [Wed, 19 Jun 2013 09:41:30 +0000 (09:41 +0000)] 
Reduce the buggy PPP wait to 1 second.

12 years agoWhen adding or changing routes, always supply IFP and IFA so we match
Roy Marples [Wed, 19 Jun 2013 09:36:52 +0000 (09:36 +0000)] 
When adding or changing routes, always supply IFP and IFA so we match
kernel messages 100%.
Restore purging kernel IPv6 routers.

12 years agoRestore linkaddr compat support for KFreeBSD
Roy Marples [Wed, 19 Jun 2013 09:17:15 +0000 (09:17 +0000)] 
Restore linkaddr compat support for KFreeBSD

12 years agoFix operation on NetBSD
Roy Marples [Wed, 19 Jun 2013 08:57:23 +0000 (08:57 +0000)] 
Fix operation on NetBSD

12 years agoWe may not have a state when we drop delegates
Roy Marples [Tue, 18 Jun 2013 22:20:52 +0000 (22:20 +0000)] 
We may not have a state when we drop delegates

12 years agoAdd a delay to initial Rebind IA_PD message.
Roy Marples [Tue, 18 Jun 2013 09:17:28 +0000 (09:17 +0000)] 
Add a delay to initial Rebind IA_PD message.
Delay initial DHCPv6 messages a futher 2 seconds for POINTOPOINT links to
try and ensure dhcpcd receives a reply.
Process link events last so that dhcpcd can process any rejection messages.
When a delegating interface stops, the delegates addresses will be removed.

12 years agoFix a crash with departing interfaces.
Roy Marples [Wed, 12 Jun 2013 18:24:16 +0000 (18:24 +0000)] 
Fix a crash with departing interfaces.
Fix more needless spam when an interface departs.

12 years agoEnsure we read the full lease.
Roy Marples [Wed, 12 Jun 2013 15:21:05 +0000 (15:21 +0000)] 
Ensure we read the full lease.

12 years agoAdd initial delays as per RFC3315, 17.1.2, 18.1.2 and 18.1.5.
Roy Marples [Wed, 12 Jun 2013 15:01:59 +0000 (15:01 +0000)] 
Add initial delays as per RFC3315, 17.1.2, 18.1.2 and 18.1.5.

When rebooting an interface, re-request information or abort
the current transaction and re-discover.

12 years agoEnsure we have the correct type to send in our saved lease as the
Roy Marples [Wed, 12 Jun 2013 10:58:28 +0000 (10:58 +0000)] 
Ensure we have the correct type to send in our saved lease as the
user could change from IA_PD to IA_NA.
Re-send INFORM_REQUEST at each ROUTERADVERT.
Save some code by sharing the drop addrs loop.

12 years agoDrop delegated addresses when we enter the discover phase.
Roy Marples [Tue, 11 Jun 2013 22:49:07 +0000 (22:49 +0000)] 
Drop delegated addresses when we enter the discover phase.
Don't request expired IAs.

12 years agoWhen releasing, remove the delegated addresses.
Roy Marples [Tue, 11 Jun 2013 10:13:19 +0000 (10:13 +0000)] 
When releasing, remove the delegated addresses.

12 years agoIf we get an invalid reply when rebinding a PD we should re-enter
Roy Marples [Tue, 11 Jun 2013 08:55:58 +0000 (08:55 +0000)] 
If we get an invalid reply when rebinding a PD we should re-enter
the discover phase.

12 years agoFix a crash.
Roy Marples [Tue, 11 Jun 2013 06:22:02 +0000 (06:22 +0000)] 
Fix a crash.

12 years agoDon't run INFORM6 twice.
Roy Marples [Mon, 10 Jun 2013 22:13:44 +0000 (22:13 +0000)] 
Don't run INFORM6 twice.

12 years agoIf we fail to rebind a PD, drop the delegations.
Roy Marples [Mon, 10 Jun 2013 21:54:00 +0000 (21:54 +0000)] 
If we fail to rebind a PD, drop the delegations.

12 years agoIA_FORCED is explicitly set now
Roy Marples [Mon, 10 Jun 2013 20:31:52 +0000 (20:31 +0000)] 
IA_FORCED is explicitly set now

12 years agoImprove logging
Roy Marples [Mon, 10 Jun 2013 20:31:34 +0000 (20:31 +0000)] 
Improve logging

12 years agoDisable flushing ra stuff for the time being.
Roy Marples [Mon, 10 Jun 2013 16:08:58 +0000 (16:08 +0000)] 
Disable flushing ra stuff for the time being.

12 years agoFix def
Roy Marples [Mon, 10 Jun 2013 09:10:18 +0000 (09:10 +0000)] 
Fix def

12 years agoFix compile on FreeBSD
Roy Marples [Mon, 10 Jun 2013 01:43:28 +0000 (01:43 +0000)] 
Fix compile on FreeBSD

12 years agoDon't disable kernel RA when in IPv4 only.
Roy Marples [Mon, 10 Jun 2013 01:15:59 +0000 (01:15 +0000)] 
Don't disable kernel RA when in IPv4 only.

12 years agoPurge prefix list and routers at start of IPv6 for BSD.
Roy Marples [Mon, 10 Jun 2013 00:56:54 +0000 (00:56 +0000)] 
Purge prefix list and routers at start of IPv6 for BSD.
Remove link_addr compact function as we now had a LL address list.
Fix INET and INET6 seperate compiles.

12 years agoRFC 3633 says that IA_PD should send a rebind, but at like a
Roy Marples [Sun, 9 Jun 2013 21:51:52 +0000 (21:51 +0000)] 
RFC 3633 says that IA_PD should send a rebind, but at like a
confirm, so add a timeout to it to re-enter the discover phase.

12 years agoDon't delete the subnet route if we don't own IPv6RA routes.
Roy Marples [Sun, 9 Jun 2013 10:57:16 +0000 (10:57 +0000)] 
Don't delete the subnet route if we don't own IPv6RA routes.

12 years agoOnly run LL callbacks from LL addresses
Roy Marples [Sun, 9 Jun 2013 10:04:46 +0000 (10:04 +0000)] 
Only run LL callbacks from LL addresses

12 years agoDon't try to delete non existant addresses
Roy Marples [Sun, 9 Jun 2013 08:45:24 +0000 (08:45 +0000)] 
Don't try to delete non existant addresses

12 years agoOnly wait for DAD to complete for RA addresses marked for autoconf.
Roy Marples [Sun, 9 Jun 2013 08:37:01 +0000 (08:37 +0000)] 
Only wait for DAD to complete for RA addresses marked for autoconf.
Thanks to Jayce Lee.

12 years agoBecause not all OS's send RTM_NEWADDR for a refreshed RA we need
Roy Marples [Sun, 9 Jun 2013 07:31:08 +0000 (07:31 +0000)] 
Because not all OS's send RTM_NEWADDR for a refreshed RA we need
to manage a list of all IPv6 addresses on an interface so that we
can know if we need to wait for DAD to complete or not.

12 years agoIf wpa_supplicant is not running when rebinding, start it for
Roy Marples [Fri, 7 Jun 2013 20:51:44 +0000 (20:51 +0000)] 
If wpa_supplicant is not running when rebinding, start it for
wireless interfaces.

12 years agoAdd a wpa_supplicant hook script.
Roy Marples [Fri, 7 Jun 2013 20:03:28 +0000 (20:03 +0000)] 
Add a wpa_supplicant hook script.

This script starts wpa_supplicant on a wireless interface if not
already running and /etc/wpa_supplicant.conf exists, stops it
when the interface departs and sends wpa_supplicant a reconfigure
command.

If dhcpcd is running in master mode, you can use `dhcpcd -n eth0'
it instruct wpa_supplicant to reload its configuration file.

12 years agoMove signal handling into dhcpcd.c
Roy Marples [Fri, 7 Jun 2013 12:44:19 +0000 (12:44 +0000)] 
Move signal handling into dhcpcd.c
Log the PID of the signal caller
Move syslog functions out of the signal handler if we're not
exiting as it's not safe.
Close existing IPv4 sockets when restarting an interface.
Fix control handling keeping current flags and accepting new ones.

12 years agoDon't log an error if deleting from a departed interface
Roy Marples [Thu, 6 Jun 2013 19:08:10 +0000 (19:08 +0000)] 
Don't log an error if deleting from a departed interface

12 years agoDon't log carrier lost if carrier was UNKNOWN.
Roy Marples [Thu, 6 Jun 2013 18:39:12 +0000 (18:39 +0000)] 
Don't log carrier lost if carrier was UNKNOWN.

12 years agoEnsure we have options before calling getopt_long(3).
Roy Marples [Thu, 6 Jun 2013 18:15:33 +0000 (18:15 +0000)] 
Ensure we have options before calling getopt_long(3).

12 years agoAdd DEPARTED reason for when an interface is removed.
Roy Marples [Thu, 6 Jun 2013 12:38:15 +0000 (12:38 +0000)] 
Add DEPARTED reason for when an interface is removed.

12 years agoDon't error if the interface goes away.
Roy Marples [Thu, 6 Jun 2013 12:38:14 +0000 (12:38 +0000)] 
Don't error if the interface goes away.

12 years agoQuote space in RFC to stop unfortunate line splitting.
Roy Marples [Thu, 6 Jun 2013 12:38:14 +0000 (12:38 +0000)] 
Quote space in RFC to stop unfortunate line splitting.

12 years agoPrefer --prefix over $PREFIX
Roy Marples [Thu, 6 Jun 2013 00:31:00 +0000 (00:31 +0000)] 
Prefer --prefix over $PREFIX

12 years agoAdd support for Rapid Commit, RFC3315 and RFC4039.
Roy Marples [Wed, 5 Jun 2013 23:57:03 +0000 (23:57 +0000)] 
Add support for Rapid Commit, RFC3315 and RFC4039.

12 years agoAdd support for NTP servers, RFC 4075
Roy Marples [Wed, 5 Jun 2013 20:48:09 +0000 (20:48 +0000)] 
Add support for NTP servers, RFC 4075

12 years agoMap DHCPv4 options to DHCPv6 where applicable.
Roy Marples [Wed, 5 Jun 2013 20:13:14 +0000 (20:13 +0000)] 
Map DHCPv4 options to DHCPv6 where applicable.
This makes for an easier configuration.
Send the FQDN option by default.

12 years agoFix disabled FQDN and allocation
Roy Marples [Wed, 5 Jun 2013 17:36:49 +0000 (17:36 +0000)] 
Fix disabled FQDN and allocation

12 years agoSilence bogus gcc messages.
Roy Marples [Wed, 5 Jun 2013 17:19:07 +0000 (17:19 +0000)] 
Silence bogus gcc messages.

12 years agoEnsure our derived hostname is NULL terminated.
Roy Marples [Wed, 5 Jun 2013 16:35:54 +0000 (16:35 +0000)] 
Ensure our derived hostname is NULL terminated.

12 years agoAdd DHPCv6 FQDN support (RFC4704)
Roy Marples [Wed, 5 Jun 2013 16:23:24 +0000 (16:23 +0000)] 
Add DHPCv6 FQDN support (RFC4704)
Improve hostname support in general, so we are aware of hostname changes.
When setting the hostname, prefer the FQDN name or append a domain.

12 years agoSupport the DHCPv6 unicast option.
Roy Marples [Wed, 5 Jun 2013 10:37:45 +0000 (10:37 +0000)] 
Support the DHCPv6 unicast option.

12 years agoHandle routers expiring a bit more cleanly and less spammy.
Roy Marples [Tue, 4 Jun 2013 15:33:13 +0000 (15:33 +0000)] 
Handle routers expiring a bit more cleanly and less spammy.

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