From 7246333cb803b03440d3bd0bdaa233564d09b5ae Mon Sep 17 00:00:00 2001 From: Patrik Flykt Date: Thu, 19 Jun 2014 15:39:53 +0300 Subject: sd-dhcp6-client: Add Request message sending As described in RFC 3315, Section 17.1.2, a client has to wait until the first timeout has elapsed before it is allowed to request IPv6 addresses from the DHCPv6 server. This is indicated by a non-NULL lease and a non-zero resend count. Should the Advertisement contain a preference value of 255 or be received after the first timeout, IPv6 address requesting is started immediately. In response to these events, create a Request message and set up proper resend timers to send the message to the server. --- src/libsystemd-network/dhcp6-protocol.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/libsystemd-network/dhcp6-protocol.h') diff --git a/src/libsystemd-network/dhcp6-protocol.h b/src/libsystemd-network/dhcp6-protocol.h index 1303a55a8..754e80008 100644 --- a/src/libsystemd-network/dhcp6-protocol.h +++ b/src/libsystemd-network/dhcp6-protocol.h @@ -54,6 +54,9 @@ enum { #define DHCP6_SOL_MAX_DELAY 1 * USEC_PER_SEC #define DHCP6_SOL_TIMEOUT 1 * USEC_PER_SEC #define DHCP6_SOL_MAX_RT 120 * USEC_PER_SEC +#define DHCP6_REQ_TIMEOUT 1 * USEC_PER_SEC +#define DHCP6_REQ_MAX_RT 120 * USEC_PER_SEC +#define DHCP6_REQ_MAX_RC 10 enum { DHCP6_DUID_LLT = 1, @@ -66,6 +69,7 @@ enum DHCP6State { DHCP6_STATE_STOPPED = 0, DHCP6_STATE_RS = 1, DHCP6_STATE_SOLICITATION = 2, + DHCP6_STATE_REQUEST = 3, }; enum { -- cgit v1.2.3