Commit Graph

1645 Commits

Author SHA1 Message Date
Roy Marples
e54dee19ba Implement the core DHCPv6 client for SOLICIT, REQUEST, RENEW, CONFIRM. 2012-11-06 23:40:15 +00:00
root@uberpc.marples.name
930c51ad33 Fix some more potential leaks and allow full build with dmalloc. 2012-11-01 17:02:01 +00:00
Roy Marples
fccffbd9cf Plug some memory leaks. 2012-11-01 14:46:05 +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
4272b8b79a Save a few bytes 2012-10-31 23:07:06 +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
8be43c978b whitespace 2012-10-31 20:17:59 +00:00
Roy Marples
6855bff4c4 Provide TAILQ_FOREACH_REVERSE_SAFE if not defined.
When removing routes, do it in reverse order.
2012-10-31 20:14:08 +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
d2ff06a35f IANA PEN should be in network order. 2012-10-31 10:42:44 +00:00
Roy Marples
0dc45107f5 DHCPCD Project has been assigned a PEN of 40712 2012-10-31 10:37:13 +00:00
Roy Marples
225624555b Improve reported timings. 2012-10-27 12:11:04 +00:00
Roy Marples
8c48758ad5 Show renew and rebind times when debugging is enabled.
Trying to help #259.
2012-10-27 11:38:17 +00:00
Roy Marples
d6011075b8 Fix stupid length validation check. 2012-10-24 19:38:09 +00:00
Roy Marples
3a83f8aced Fix compile fr systems without RTF_CLONING such as FreeBSD-8 2012-10-24 12:59:20 +00:00
Roy Marples
b47baaa14b More fixes to validation lengths. 2012-10-24 12:13:55 +00:00
Roy Marples
7d1782ea53 Fix variable length encodings 2012-10-24 12:01:03 +00:00
Roy Marples
aa5283e2e1 If we receive a packet with two options the same which is not
supposed to be an array then we now trim to the correct size
rather than just discarding the option.
This also means that if any garbage at the end of the singule
occurance of an option is also discarded.
2012-10-24 11:47:28 +00:00
Roy Marples
652b80c8a9 Drop DHCPv6 on carrier down.
Send DHCPv6 interface information.
2012-10-12 19:10:04 +00:00
Roy Marples
5ba29cbd2b Remove needless malloc. 2012-10-12 12:30:22 +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
27805e96f6 Move the default vendor string to a global variable.
When an interface starts, it assigns this by default instead of
generating it each time.
2012-10-09 13:20:50 +00:00
Roy Marples
56e106a774 Fix DUID support.
In the case where we cannot write a DUID file, then create a LL ID
instead of a LLT ID.
2012-10-09 13:14:56 +00:00
Roy Marples
f69a1765dd Make this file actually work 2012-10-08 16:25:36 +00:00
Roy Marples
9b428231f0 Don't need this header 2012-10-08 16:18:30 +00:00
Roy Marples
f7d18e2ceb xid should be treated in network byte order 2012-10-08 16:13:47 +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
0b0b417782 Restart the interface immediately after a NAK instead of
waiting one second.
2012-09-22 13:28:34 +00:00
Roy Marples
5992d5ede3 Release dhcpcd-5.6.2 2012-09-03 08:49:14 +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
f59b5ba3d2 Only accept netlink messages from the kernel.
Thanks to Mikhail Efremov.
2012-08-24 19:05:26 +00:00
Roy Marples
6bf4099757 Only add our own host or destination routes to the build table when
we are adding gateways.
Thanks to Nazarov Yuriy Pavlovich.
2012-08-23 08:39:16 +00:00
Roy Marples
701b840fc4 Remove -v from --version in usage. 2012-08-18 13:58:53 +00:00
Roy Marples
fc6c8ec865 For some reason, Linux likes to re-add the IPv6 network route even if
it exists on a different metric than the default.
2012-08-07 07:03:13 +00:00
Roy Marples
c5fa597676 Seems we need braces here. 2012-08-06 20:31:33 +00:00
Roy Marples
2ff654acbf Add pltime and vltime to our IPv6 addresses. 2012-08-06 20:13:47 +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
383929ca7a We should send our NS solicitation directly to the router. 2012-08-06 12:31:42 +00:00
Roy Marples
96637a8635 Add MTU to IPv6 routes on Linux. 2012-08-06 10:52:48 +00:00
Roy Marples
8ce6389572 If we fail to open sockets, don't bother sending the request. 2012-08-06 10:24:13 +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
a02ed28a38 Don't set if_up or if_down as true when testing. 2012-07-18 08:35:07 +00:00
Roy Marples
bde566f574 Disable kernel interface RA as early as possible on Linux.
Don't add duplicate interfaces to the restore kernel RA on Linux.
2012-07-13 08:22:04 +00:00
Roy Marples
8ac16c4bb2 Release dhcpcd-5.6.1 2012-07-12 16:34:33 +00:00