start integer 100 DHCPv4 pool start
limit integer 150 DHCPv4 pool size
-ula_compat bool 0 Announce ULA in compat mode
ra_default integer 0 Override default route
0: default, 1: ignore no public address, 2: ignore all
ra_management integer 1 RA management mode
IFACE_ATTR_NDP,
IFACE_ATTR_DNS,
IFACE_ATTR_DOMAIN,
- IFACE_ATTR_ULA_COMPAT,
IFACE_ATTR_RA_DEFAULT,
IFACE_ATTR_RA_MANAGEMENT,
IFACE_ATTR_RA_OFFLINK,
[IFACE_ATTR_NDP] = { .name = "ndp", .type = BLOBMSG_TYPE_STRING },
[IFACE_ATTR_DNS] = { .name = "dns", .type = BLOBMSG_TYPE_ARRAY },
[IFACE_ATTR_DOMAIN] = { .name = "domain", .type = BLOBMSG_TYPE_ARRAY },
- [IFACE_ATTR_ULA_COMPAT] = { .name = "ula_compat", .type = BLOBMSG_TYPE_BOOL },
[IFACE_ATTR_RA_DEFAULT] = { .name = "ra_default", .type = BLOBMSG_TYPE_INT32 },
[IFACE_ATTR_RA_MANAGEMENT] = { .name = "ra_management", .type = BLOBMSG_TYPE_INT32 },
[IFACE_ATTR_RA_OFFLINK] = { .name = "ra_offlink", .type = BLOBMSG_TYPE_BOOL },
}
}
- if ((c = tb[IFACE_ATTR_ULA_COMPAT]))
- iface->deprecate_ula_if_public_avail = blobmsg_get_bool(c);
-
if ((c = tb[IFACE_ATTR_RA_DEFAULT]))
iface->default_router = blobmsg_get_u32(c);
if (a) {
uint32_t pref = 3600;
uint32_t valid = 3600;
- bool have_non_ula = false;
- for (size_t i = 0; i < iface->ia_addr_len; ++i)
- if ((iface->ia_addr[i].addr.s6_addr[0] & 0xfe) != 0xfc)
- have_non_ula = true;
for (size_t i = 0; i < iface->ia_addr_len; ++i) {
bool match = true;
iface->ia_addr[i].preferred <= (uint32_t)now)
continue;
- // ULA-deprecation compatibility workaround
- if ((iface->ia_addr[i].addr.s6_addr[0] & 0xfe) == 0xfc &&
- a->length == 128 && have_non_ula &&
- iface->deprecate_ula_if_public_avail)
- continue;
-
if (prefix_pref > 86400)
prefix_pref = 86400;
bool master;
bool ignore;
bool always_rewrite_dns;
- bool deprecate_ula_if_public_avail;
bool ra_not_onlink;
bool no_dynamic_dhcp;
adv.h.nd_ra_router_lifetime = 0;
}
- if (have_public && iface->deprecate_ula_if_public_avail)
- for (size_t i = 0; i < cnt; ++i)
- if ((adv.prefix[i].nd_opt_pi_prefix.s6_addr[0] & 0xfe) == 0xfc)
- adv.prefix[i].nd_opt_pi_preferred_time = 0;
-
// DNS Recursive DNS
if (iface->dns_cnt > 0) {
dns_addr = iface->dns;