From 60f57b2bfb87c463fc271a9c3e8e1f97feaecdca Mon Sep 17 00:00:00 2001 From: Hans Dedecker Date: Wed, 18 Mar 2015 16:54:48 +0100 Subject: netifd:Make sure interface device config is also cached Fixes issue interface device config is not applied in some cases. As the interface device config was applied but not always cached; an interface device config diff was not always detected. Simplify device config setting by exposing as api only device_apply_config Signed-off-by: Hans Dedecker --- interface.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'interface.c') diff --git a/interface.c b/interface.c index 72599e6..444f3ac 100644 --- a/interface.c +++ b/interface.c @@ -918,11 +918,11 @@ interface_handle_link(struct interface *iface, const char *name, bool add, bool } if (add) { - device_set_present(dev, true); if (iface->device_config && dev->default_config) - device_set_config(dev, dev->type, iface->config); + device_apply_config(dev, dev->type, iface->config); + + device_set_present(dev, true); - system_if_apply_settings(dev, &dev->settings, dev->settings.flags); ret = interface_add_link(iface, dev, link_ext); } else { ret = interface_remove_link(iface, dev); -- cgit v1.2.3