Further align the code to use DHCPv6 assignment flags to distinguish
between prefix delegation and non temporary address assignments
Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
addr = addrs[i].addr.in6;
pref = addrs[i].preferred;
valid = addrs[i].valid;
- if (prefix == 128) {
+ if (c->flags & OAF_DHCPV6_NA) {
if (!ADDR_ENTRY_VALID_IA_ADDR(iface, i, m, addrs))
continue;
blobmsg_add_string(&b, NULL, "static");
blobmsg_close_array(&b, m);
- m = blobmsg_open_array(&b, a->length == 128 ? "ipv6-addr": "ipv6-prefix");
+ m = blobmsg_open_array(&b, a->flags & OAF_DHCPV6_NA ? "ipv6-addr": "ipv6-prefix");
dhcpv6_ia_enum_addrs(iface, a, now, dhcpv6_blobmsg_ia_addr, NULL);
blobmsg_close_table(&b, m);