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
&& olen > -4 + sizeof(struct dhcpv6_ia_hdr)) {
struct dhcpv6_ia_hdr *ia_hdr = (void*)(&odata[-4]);
+ if ((na_mode == IA_MODE_NONE && otype == DHCPV6_OPT_IA_NA) ||
+ (pd_mode == IA_MODE_NONE && otype == DHCPV6_OPT_IA_PD))
+ continue;
+
// Test ID
if (ia_hdr->iaid != htonl(1) && otype == DHCPV6_OPT_IA_NA)
continue;
// 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++;
}