htons(DHCPV6_OPT_PD_EXCLUDE),
htons(DHCPV6_OPT_SOL_MAX_RT),
htons(DHCPV6_OPT_INF_MAX_RT),
-#ifdef EXT_PREFIX_CLASS
- htons(DHCPV6_OPT_PREFIX_CLASS),
-#endif
#ifdef EXT_CER_ID
htons(DHCPV6_OPT_CER_ID),
#endif
// Update address IA
dhcpv6_for_each_option(&ia_hdr[1], end, otype, olen, odata) {
struct odhcp6c_entry entry = {IN6ADDR_ANY_INIT, 0, 0,
- IN6ADDR_ANY_INIT, 0, 0, 0, 0, 0, 0};
+ IN6ADDR_ANY_INIT, 0, 0, 0, 0, 0};
entry.iaid = ia_hdr->iaid;
uint16_t stype, slen;
uint8_t *sdata;
-#ifdef EXT_PREFIX_CLASS
- // Find prefix class, if any
- dhcpv6_for_each_option(&prefix[1], odata + olen,
- stype, slen, sdata)
- if (stype == DHCPV6_OPT_PREFIX_CLASS && slen == 2)
- entry.class = sdata[0] << 8 | sdata[1];
-#endif
-
// Parse PD-exclude
bool ok = true;
dhcpv6_for_each_option(odata + sizeof(*prefix) - 4U,
entry.length = 128;
entry.target = addr->addr;
-#ifdef EXT_PREFIX_CLASS
- uint16_t stype, slen;
- uint8_t *sdata;
- // Find prefix class, if any
- dhcpv6_for_each_option(&addr[1], odata + olen,
- stype, slen, sdata)
- if (stype == DHCPV6_OPT_PREFIX_CLASS && slen == 2)
- entry.class = sdata[0] << 8 | sdata[1];
-#endif
-
odhcp6c_update_entry(STATE_IA_NA, &entry, 0, false);
parsed_ia++;
}
new->valid - x->valid < min_update_interval &&
new->preferred >= x->preferred &&
new->preferred != UINT32_MAX &&
- new->preferred - x->preferred < min_update_interval &&
- x->class == new->class)
+ new->preferred - x->preferred < min_update_interval)
return false;
x->valid = new->valid;
x->preferred = new->preferred;
x->t1 = new->t1;
x->t2 = new->t2;
- x->class = new->class;
x->iaid = new->iaid;
} else {
odhcp6c_add_state(state, new, sizeof(*new));
DHCPV6_OPT_PD_EXCLUDE = 67,
DHCPV6_OPT_SOL_MAX_RT = 82,
DHCPV6_OPT_INF_MAX_RT = 83,
-#ifdef EXT_PREFIX_CLASS
- /* draft-bhandari-dhc-class-based-prefix, not yet standardized */
- DHCPV6_OPT_PREFIX_CLASS = EXT_PREFIX_CLASS,
-#endif
#ifdef EXT_CER_ID
/* draft-donley-dhc-cer-id-option-03 */
DHCPV6_OPT_CER_ID = EXT_CER_ID,
uint32_t preferred;
uint32_t t1;
uint32_t t2;
- uint16_t class;
uint32_t iaid;
};
bool changed = false;
uint8_t buf[1500], cmsg_buf[128];
struct nd_router_advert *adv = (struct nd_router_advert*)buf;
- struct odhcp6c_entry entry = {IN6ADDR_ANY_INIT, 0, 0, IN6ADDR_ANY_INIT, 0, 0, 0, 0, 0, 0};
+ struct odhcp6c_entry entry = {IN6ADDR_ANY_INIT, 0, 0, IN6ADDR_ANY_INIT, 0, 0, 0, 0, 0};
const struct in6_addr any = IN6ADDR_ANY_INIT;
if (IN6_IS_ADDR_UNSPECIFIED(&lladdr)) {
buf_len += snprintf(&buf[buf_len], 24, ",%u,%u", e[i].preferred, e[i].valid);
}
- if ((type == ENTRY_PREFIX || type == ENTRY_ADDRESS) && e[i].class)
- buf_len += snprintf(&buf[buf_len], 12, ",class=%u", e[i].class);
- else if (type == ENTRY_PREFIX && ntohl(e[i].iaid) != 1)
+ if (type == ENTRY_PREFIX && ntohl(e[i].iaid) != 1)
buf_len += snprintf(&buf[buf_len], 16, ",class=%08x", ntohl(e[i].iaid));
if (type == ENTRY_PREFIX && e[i].priority) {