diff options
author | Hans Dedecker <dedeckeh@gmail.com> | 2019-02-27 11:10:29 +0100 |
---|---|---|
committer | Hans Dedecker <dedeckeh@gmail.com> | 2019-02-27 11:47:12 +0100 |
commit | 16c5b6c9bcb71bb67a6ab15bb458bf9ab5a8fe7e (patch) | |
tree | 335fbeb00de107d1fde248a2e2e8d173168068ab /src | |
parent | 9e9389c9c6ebd29d61fd35c563c365195d263848 (diff) |
ubus: always trigger an update if interface is not found
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>
Diffstat (limited to 'src')
-rw-r--r-- | src/ubus.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -245,15 +245,15 @@ static int handle_update(_unused struct ubus_context *ctx, _unused struct ubus_o { 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; } } |