// client options
static unsigned int client_options = 0;
+// Minimum valid lifetime for IA_PD updates
+static unsigned int pd_safe_valid = 0;
+
static uint32_t ntohl_unaligned(const uint8_t *data)
{
uint32_t buf;
return "Unknown";
}
-int init_dhcpv6(const char *ifname, unsigned int options, int sol_timeout)
+int init_dhcpv6(const char *ifname, unsigned int options, int sol_timeout, unsigned int ia_pd_safe_valid)
{
client_options = options;
dhcpv6_retx[DHCPV6_MSG_SOLICIT].max_timeo = sol_timeout;
+ pd_safe_valid = ia_pd_safe_valid;
sock = socket(AF_INET6, SOCK_DGRAM | SOCK_CLOEXEC, IPPROTO_UDP);
if (sock < 0)
}
if (ok) {
- if (odhcp6c_update_entry(STATE_IA_PD, &entry, 0, 0))
+ if (odhcp6c_update_entry(STATE_IA_PD, &entry, pd_safe_valid, 0))
updated_IAs++;
syslog(LOG_INFO, "%s/%d preferred %d valid %d",