IFACE_ATTR_NDP,
IFACE_ATTR_DNS,
IFACE_ATTR_DOMAIN,
+ IFACE_ATTR_DHCPV6_RAW,
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_DHCPV6_RAW] = { .name = "dhcpv6_raw", .type = BLOBMSG_TYPE_STRING },
[IFACE_ATTR_PD_MANAGER] = { .name = "pd_manager", .type = BLOBMSG_TYPE_STRING },
[IFACE_ATTR_PD_CER] = { .name = "pd_cer", .type = BLOBMSG_TYPE_STRING },
[IFACE_ATTR_RA_DEFAULT] = { .name = "ra_default", .type = BLOBMSG_TYPE_INT32 },
free(iface->upstream);
free(iface->static_ndp);
free(iface->dhcpv4_dns);
+ free(iface->dhcpv6_raw);
memset(&iface->ra, 0, sizeof(*iface) - offsetof(struct interface, ra));
}
}
}
+ if ((c = tb[IFACE_ATTR_DHCPV6_RAW])) {
+ iface->dhcpv6_raw_len = blobmsg_data_len(c) / 2;
+ iface->dhcpv6_raw = realloc(iface->dhcpv6_raw, iface->dhcpv6_raw_len);
+ odhcpd_unhexlify(iface->dhcpv6_raw, iface->dhcpv6_raw_len, blobmsg_get_string(c));
+ }
+
if ((c = tb[IFACE_ATTR_RA_DEFAULT]))
iface->default_router = blobmsg_get_u32(c);
uint8_t *odata;
dhcpv6_for_each_option(hdr->options, data + len, otype, olen, odata) {
if (otype == DHCPV6_OPT_RELAY_MSG) {
- iov[8].iov_base = odata + olen;
- iov[8].iov_len = (((uint8_t*)iov[0].iov_base) + iov[0].iov_len)
+ iov[9].iov_base = odata + olen;
+ iov[9].iov_len = (((uint8_t*)iov[0].iov_base) + iov[0].iov_len)
- (odata + olen);
handle_nested_message(odata, olen, opts, end, iov);
return;
{search_domain, search_len},
{pdbuf, 0},
{&cerid, 0},
+ {iface->dhcpv6_raw, iface->dhcpv6_raw_len},
{NULL, 0}};
uint8_t *opts = (uint8_t*)&hdr[1], *opts_end = (uint8_t*)data + len;