* OPTION_<num> Custom option received as base-16
* PREFIXES A space-separated list of prefixes currently assigned
Format: <prefix>/<length>,preferred,valid
-* PREFIXES_LOST A space-separated list of prefixes lost since last update
if (timeout > valid)
timeout = valid;
-
- if (prefix->valid == 0) // We probably lost that prefix
- odhcp6c_add_state(STATE_IA_PD_LOST,
- prefix, olen);
} else if (otype == DHCPV6_OPT_IA_ADDR) {
struct dhcpv6_ia_addr *addr = (void*)&odata[-4];
if (olen + 4U < sizeof(*addr))
odhcp6c_clear_state(STATE_SERVER_ID);
odhcp6c_clear_state(STATE_SERVER_CAND);
odhcp6c_clear_state(STATE_IA_PD);
- odhcp6c_clear_state(STATE_IA_PD_LOST);
odhcp6c_clear_state(STATE_SNTP_IP);
odhcp6c_clear_state(STATE_SNTP_FQDN);
odhcp6c_clear_state(STATE_SIP_IP);
size_t ia_pd_len, ia_na_len, server_id_len;
- uint8_t *ia_pd = odhcp6c_get_state(STATE_IA_PD, &ia_pd_len);
+ odhcp6c_get_state(STATE_IA_PD, &ia_pd_len);
odhcp6c_get_state(STATE_IA_NA, &ia_na_len);
odhcp6c_get_state(STATE_SERVER_ID, &server_id_len);
// Add all prefixes to lost prefixes
- odhcp6c_add_state(STATE_IA_PD_LOST, ia_pd, ia_pd_len);
odhcp6c_clear_state(STATE_IA_PD);
if (do_signal == SIGALRM)
STATE_SEARCH,
STATE_IA_NA,
STATE_IA_PD,
- STATE_IA_PD_LOST,
STATE_CUSTOM_OPTS,
STATE_SNTP_IP,
STATE_SNTP_FQDN,
struct in6_addr *sip = odhcp6c_get_state(STATE_SIP_IP, &sip_ip_len);
uint8_t *sip_fqdn = odhcp6c_get_state(STATE_SIP_FQDN, &sip_fqdn_len);
- size_t prefix_len, lost_pd_len;
+ size_t prefix_len;
uint8_t *prefix = odhcp6c_get_state(STATE_IA_PD, &prefix_len);
- uint8_t *lost_pd = odhcp6c_get_state(STATE_IA_PD_LOST, &lost_pd_len);
// Don't set environment before forking, because env is leaky.
if (fork() == 0) {
fqdn_to_env("SIP_DOMAIN", sip_fqdn, sip_fqdn_len);
bin_to_env(custom, custom_len);
prefix_to_env("PREFIXES", prefix, prefix_len);
- prefix_to_env("PREFIXES_LOST", lost_pd, lost_pd_len);
argv[2] = (char*)status;
execv(argv[0], argv);
}
// Delete lost prefixes and user opts
- odhcp6c_clear_state(STATE_IA_PD_LOST);
odhcp6c_clear_state(STATE_CUSTOM_OPTS);
}