Roy Marples [Sun, 21 Jul 2013 09:57:27 +0000 (09:57 +0000)]
Rename the script option fqdn_name to fqdn for DHCPv4 replies to
match DHCPv6 as it makes name sense.
Request the FQDN option by default as well as sending it.
Roy Marples [Tue, 25 Jun 2013 08:31:11 +0000 (08:31 +0000)]
Detect link address changes on Linux.
Only NetBSD emits RTM_CHGADDR for link address changes.
Sadly no other BSD emits anything for link address changes so we have
to do a full discovery on carrier up.
When a link address does change, simply carry on as we are, no need
to drop any existing lease as the carrier change will do that for us.
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.
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.
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.
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.
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.
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.
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.
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.
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
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.
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