a = blobmsg_open_table(&b, "device");
list_for_each_entry(iface, &interfaces, head) {
- if (iface->dhcpv4 != RELAYD_SERVER)
+ if (iface->dhcpv4 != RELAYD_SERVER || iface->dhcpv4_assignments.next == NULL)
continue;
void *i = blobmsg_open_table(&b, iface->ifname);
a = blobmsg_open_table(&b, "device");
list_for_each_entry(iface, &interfaces, head) {
- if (iface->dhcpv6 != RELAYD_SERVER)
+ if (iface->dhcpv6 != RELAYD_SERVER || iface->ia_assignments.next == NULL)
continue;
void *i = blobmsg_open_table(&b, iface->ifname);
list_for_each_entry(a, &iface->ia_assignments, head) {
if (a == border || (!INFINITE_VALID(a->valid_until) &&
- a->valid_until < now))
+ a->valid_until < now))
continue;
void *m, *l = blobmsg_open_table(&b, NULL);