static void
resolve_networks(struct uci_element *e, struct fw3_zone *zone)
{
- struct fw3_device *net, *tmp;
+ struct fw3_device *net, *dev, *tmp;
list_for_each_entry(net, &zone->networks, list)
{
continue;
}
+ list_for_each_entry(dev, &zone->devices, list)
+ if (!strcmp(dev->name, tmp->name))
+ goto alias;
+
snprintf(tmp->network, sizeof(tmp->network), "%s", net->name);
list_add_tail(&tmp->list, &zone->devices);
+ continue;
+alias:
+ free(tmp);
}
}