summaryrefslogtreecommitdiffstats
path: root/src/ipv6.c
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2017-07-25 11:00:44 +0100
committerRoy Marples <roy@marples.name>2017-07-25 18:54:46 +0100
commitead330b446564dabb9a32040d6b37b7ae0b24a72 (patch)
tree33f7f4093042775b94443539b3bec54d8e6b0ccf /src/ipv6.c
parent20690fe51f2837e71889f3669169584aed043ed8 (diff)
downloaddhcpcd-ead330b446564dabb9a32040d6b37b7ae0b24a72.tar.xz
dhcp6: implement lastlease and lastleaseextend
Summary: This has resulted in a fair churn of code, but in summary: * TIMEDOUT state introduced * lease binding split out from handledata * generic fail function introduced to attempt rebind of lastlease * extended addresses are remembered and purged when a lease is re-negotiated * defaults of 0 are no longer hard coded for most timers Fixes T128. Test Plan: Obtain a dhcp6 lease, kill dhcpcd and the dhcp6 server. run with `--lastlease` and check it's applied correctly. Also, observe timers to ensure it renews, rebinds and expires. Do same, but now with `--lastleaseextend as well`. Observe same timers, but it should not expire but become an infinite lease until a new one appears. Reviewers: shahid Reviewed By: shahid Maniphest Tasks: T128 Differential Revision: https://dev.marples.name/D125
Diffstat (limited to 'src/ipv6.c')
-rw-r--r--src/ipv6.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/ipv6.c b/src/ipv6.c
index dfc7a3cb..e94a1253 100644
--- a/src/ipv6.c
+++ b/src/ipv6.c
@@ -594,7 +594,7 @@ ipv6_deletedaddr(struct ipv6_addr *ia)
#endif
}
-static void
+void
ipv6_deleteaddr(struct ipv6_addr *ia)
{
struct ipv6_state *state;
@@ -1447,7 +1447,7 @@ ipv6_tryaddlinklocal(struct interface *ifp)
struct ipv6_addr *
ipv6_newaddr(struct interface *ifp, struct in6_addr *addr, uint8_t prefix_len,
- short flags)
+ int flags)
{
struct ipv6_addr *ia;
char buf[INET6_ADDRSTRLEN];