Commit Graph

39 Commits

Author SHA1 Message Date
Roy Marples
cd3612e5ca Respect the ONLINK flag the prefix option of the RA 2012-12-11 09:00:49 +00:00
Roy Marples
b2e8d8da6a Avoid sillyness if not a valid IPv6 address 2012-11-24 20:35:53 +00:00
Roy Marples
c2e168a8c1 Set %interface for exported IPv6 link local addresses. 2012-11-24 20:11:49 +00:00
Roy Marples
d11fe9caba Stop probing when dropped 2012-11-13 15:40:00 +00:00
Roy Marples
9eb6e8dc94 Use a proper namespace for eloop 2012-11-13 11:25:51 +00:00
Roy Marples
53d0e762a9 Ensure we have a big enough buffer for an escaped DNSSL option. 2012-11-07 14:19:45 +00:00
Roy Marples
b88df42135 When an RA is forced to expire, don't run the script twice. 2012-11-07 00:49:33 +00:00
Roy Marples
e54dee19ba Implement the core DHCPv6 client for SOLICIT, REQUEST, RENEW, CONFIRM. 2012-11-06 23:40:15 +00:00
Roy Marples
f98846d423 If we receive >1 MTU option, last one takes precendence. 2012-11-01 02:12:15 +00:00
Roy Marples
47102c8346 Expire RDNSS and DNSSL options if the RA expires. 2012-10-31 22:56:41 +00:00
Roy Marples
d4e41f4b6e Merge multiple options together as per RFC4861 section 6.3.4 2012-10-31 22:29:28 +00:00
Roy Marples
7e5b6d033e No need to check if we have a prefix, as this could be a localised LAN. 2012-10-31 17:21:42 +00:00
Roy Marples
3530801140 When we receive a RA with a lifetime of 0, we should just remove
the default router and let any options expire as set in accordance
with RFC4861 section 4.2
2012-10-31 17:10:22 +00:00
Roy Marples
376e8b8055 Only remove IPv6 addresses when no RA's have them configured. 2012-10-31 13:58:36 +00:00
Roy Marples
7c3772a868 If we receive a RA with a lifetime of 0, just expire it right away
and continue.
2012-10-31 12:34:27 +00:00
Roy Marples
bd236c286d If there is not IPv6 subnet route to delete, don't moan. 2012-10-12 12:13:16 +00:00
Roy Marples
f29cbe614f Fix code for -Wstrict-overflow 2012-10-12 11:26:20 +00:00
Roy Marples
d7555c1259 Add DHCPv6 INFORM support.
This is automatically started when RA flags O is set.
If no DHCPv6 request options are configured in dhcpcd.conf then we
request domain servers and search lists.
2012-10-12 10:31:51 +00:00
Roy Marples
ca15a0aa38 Move the RS state into a struct in a generic data array.
We should move the DHCP code there, but more importantly allows
DHCP6 to slot in later.
2012-09-22 18:25:17 +00:00
Roy Marples
259835194a Ensure we have correct memory allocation for number of prefixes. 2012-08-30 16:26:38 +00:00
Roy Marples
ea112ab290 Change the NS times so that we assume reachable until the reachable
time expires, then send probes at retrans intervals until
DELAY_FIRST_PROBE_TIME is reached at which point we expire the router.
2012-08-06 19:32:15 +00:00
Roy Marples
50083515db ra%d_prefix is now a space separated array of the finished address/len 2012-07-18 08:35:17 +00:00
Roy Marples
ba0a5b3e17 Don't restore kernel RA defaults or drop RA's when forking.
Add some more memory cleanups when testing forking.
2012-07-12 09:19:14 +00:00
Roy Marples
eebe9a1887 Improve IPv6 RA support by allowing dhcpcd to manage the address and routes
instead of the kernel. dhcpcd will only do this if RA is disabled in the kernel
or dhcpcd has been instructed to do this via dhcpcd.conf(5) ipv6ra_own and
ipv6ra_own_default directives.

Send and process IPv6 Neighbor Solicitions and Adverts to prove router
reachability. If a router cannot be reached in this way then it is expired.

When debugging, all ND messages are displayed which will create a lot of log
spam.

To ease packaging, ./configure now accepts LDFLAGS and --enable-static.
2012-07-05 16:37:41 +00:00
Roy Marples
248cf0d859 Remove unused variables 2012-04-01 07:38:52 +00:00
Roy Marples
d08933a85d Fix compile on Linux 2012-03-30 09:42:01 +00:00
Roy Marples
2c77247bd0 Interface index should persist and be unique for the interface lifetime.
As such, store it at discover and stop using if_nametoindex(3).
2012-03-30 09:37:21 +00:00
Roy Marples
bb02dff14d Fix a double free, #243.
Stop leaking memory on interface restart with prior RA.
2012-03-24 12:58:12 +00:00
Roy Marples
65436fea3d Remove buffer overrun that leads to a segfault on ipv6 network.
strcpy copies the \0 of its src argument, therefore the following line
is unneeded. Ironically, it can lead to a nasty segfault on a network
that supports ipv6. In fact, it prevented me from access such a
network using DHCP.

Signed-off-by: Sidney Amani <seed95@gmail.com>
2012-03-23 07:38:39 +00:00
Roy Marples
02f1a2afac Use correct event loop timeout deletion to stop occasional segfaults.
Fix a memory leak and free our global buffers if debugging memory.
2012-03-20 13:46:35 +00:00
Roy Marples
61dd6cf9ab Add an option to control dhcpcd forking or not if the RA does not contain
a RDNSS option.
This involves changing our options to an unsigned long long so we can use
more than 32 bits.
2012-03-07 10:06:45 +00:00
Roy Marples
59b38886f9 Don't fork on IPv6 RA unless we have an RDNSS option. 2012-03-05 16:45:10 +00:00
Roy Marples
46caaa5ee4 Store the RA data for the interface so we can do a comparison.
Only log the fact we received an RA if the new RA is different or any
part of the old one has expired.
2012-02-13 08:37:54 +00:00
roy@uberlaptop.marples.name
441b06bc38 If the kernel is not configured to accept IPv6 or RA's then don't
needless attempt to solicit an IPv6 RA.
2012-02-04 15:15:25 +00:00
Roy Marples
8aa2252b74 Fix a compile issue and releae dhcpcd-5.5.3 2012-02-03 00:02:03 +00:00
Roy Marples
449df9c859 Fix some more copyrights
RA expiry timers now trigger off options as well
Stop prefixing new_ for RA options
if_up and if_down are now set by dhcpcd itself
Correctly prefer a DHCP lease over an IPv4LL entry
2012-02-02 16:22:40 +00:00
Roy Marples
f36522c53f Fix hook for non RA's.
Remove RA's before the DHCP lease.
Correctly send 3 RA solicitations.
2011-12-16 12:20:04 +00:00
Roy Marples
7be4b9b31f Fix warnings on Linux 2011-12-15 03:22:47 +00:00
Roy Marples
91cd732493 Add an implementation of an IPv6 Router Solicitor as specified in
RFC6016 with regards to RDNSS and DNSSL.
2011-12-15 02:35:47 +00:00