+ } else if (is_na) {
+ uint8_t *sdata;
+ uint16_t stype, slen;
+ dhcpv6_for_each_option(&ia[1], odata + olen, stype, slen, sdata) {
+ if (stype != DHCPV6_OPT_IA_ADDR || slen < sizeof(struct dhcpv6_ia_addr) - 4)
+ continue;
+
+#ifdef DHCPV6_OPT_PREFIX_CLASS
+ uint8_t *xdata;
+ uint16_t xtype, xlen;
+ struct dhcpv6_ia_addr *p = (struct dhcpv6_ia_addr*)&sdata[-4];
+ dhcpv6_for_each_option(&p[1], sdata + slen, xtype, xlen, xdata) {
+ if (xtype != DHCPV6_OPT_PREFIX_CLASS || xlen != 2)
+ continue;
+
+ if (classes_cnt >= classes_max)
+ continue;
+
+ classes[classes_cnt++] = (uint16_t)xdata[0] << 8 | (uint16_t)xdata[1];
+ }
+#endif
+ }