Commit
9f25dd8af76dc30e54ddcbb4a284058e598951d5 changed the logic of
handle_update by only triggering an update if the interface is
found in the interface list and is not set as to be ignored.
However this breaks the behavior of loading the dhcp config for
interfaces which were previously not yet known by netifd and as
result were not yet created in the interface list.
Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
{
struct blob_attr *tb[IFACE_ATTR_MAX];
struct interface *c;
- bool update = false;
+ bool update = true;
blobmsg_parse(iface_attrs, IFACE_ATTR_MAX, tb, blob_data(msg), blob_len(msg));
const char *interface = (tb[IFACE_ATTR_INTERFACE]) ?
blobmsg_get_string(tb[IFACE_ATTR_INTERFACE]) : "";
avl_for_each_element(&interfaces, c, avl) {
- if (!strcmp(interface, c->name) && !c->ignore) {
- update = true;
+ if (!strcmp(interface, c->name) && c->ignore) {
+ update = false;
break;
}
}