}
// Create ORO
- uint16_t oro[] = {htons(DHCPV6_OPT_DNS_SERVERS),
+ uint16_t oro[] = {
+ htons(DHCPV6_OPT_SIP_SERVER_D),
+ htons(DHCPV6_OPT_SIP_SERVER_A),
+ htons(DHCPV6_OPT_DNS_SERVERS),
htons(DHCPV6_OPT_DNS_DOMAIN),
htons(DHCPV6_OPT_NTP_SERVER),
- htons(DHCPV6_OPT_SIP_SERVER_A),
- htons(DHCPV6_OPT_SIP_SERVER_D),
- htons(DHCPV6_OPT_PD_EXCLUDE)};
+ htons(DHCPV6_OPT_AFTR_NAME),
+ htons(DHCPV6_OPT_PD_EXCLUDE),
+ };
odhcp6c_add_state(STATE_ORO, oro, sizeof(oro));
odhcp6c_clear_state(STATE_SNTP_FQDN);
odhcp6c_clear_state(STATE_SIP_IP);
odhcp6c_clear_state(STATE_SIP_FQDN);
+ odhcp6c_clear_state(STATE_AFTR_NAME);
}
// Parse and find all matching IAs
if (r->protocol == 3 && r->algorithm == 1 &&
r->reconf_type == 1)
memcpy(reconf_key, r->key, sizeof(r->key));
+ } else if (otype == DHCPV6_OPT_AFTR_NAME && olen > 3) {
+ size_t cur_len;
+ odhcp6c_get_state(STATE_AFTR_NAME, &cur_len);
+ if (cur_len == 0)
+ odhcp6c_add_state(STATE_AFTR_NAME, odata, olen);
} else if (otype != DHCPV6_OPT_CLIENTID &&
otype != DHCPV6_OPT_SERVERID) {
odhcp6c_add_state(STATE_CUSTOM_OPTS,
DHCPV6_OPT_NTP_SERVER = 56,
DHCPV6_OPT_SIP_SERVER_D = 21,
DHCPV6_OPT_SIP_SERVER_A = 22,
+ DHCPV6_OPT_AFTR_NAME = 64,
DHCPV6_OPT_PD_EXCLUDE = 67,
};
STATE_RA_ROUTE,
STATE_RA_PREFIX,
STATE_RA_DNS,
+ STATE_AFTR_NAME,
_STATE_MAX
};
void script_call(const char *status)
{
size_t dns_len, search_len, custom_len, sntp_ip_len, sntp_dns_len;
- size_t sip_ip_len, sip_fqdn_len;
+ size_t sip_ip_len, sip_fqdn_len, aftr_name_len;
odhcp6c_expire();
if (delayed_call)
uint8_t *sntp_dns = odhcp6c_get_state(STATE_SNTP_FQDN, &sntp_dns_len);
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);
+ uint8_t *aftr_name = odhcp6c_get_state(STATE_AFTR_NAME, &aftr_name_len);
size_t prefix_len, address_len, ra_pref_len, ra_route_len, ra_dns_len;
uint8_t *prefix = odhcp6c_get_state(STATE_IA_PD, &prefix_len);
fqdn_to_env("DOMAINS", search, search_len);
fqdn_to_env("SNTP_FQDN", sntp_dns, sntp_dns_len);
fqdn_to_env("SIP_DOMAIN", sip_fqdn, sip_fqdn_len);
+ fqdn_to_env("AFTR", aftr_name, aftr_name_len);
bin_to_env(custom, custom_len);
entry_to_env("PREFIXES", prefix, prefix_len, ENTRY_PREFIX);
entry_to_env("ADDRESSES", address, address_len, ENTRY_ADDRESS);