From: Luka Perkov Date: Thu, 29 Aug 2013 13:28:27 +0000 (+0200) Subject: bridge: fix corner case with network reload X-Git-Url: http://git.archive.openwrt.org/?p=project%2Fnetifd.git;a=commitdiff_plain;h=814e09499e12edaea658f9f5594fe9917c0ecde4 bridge: fix corner case with network reload After removing all ifname options from bridge interface and executing network reload the configuration was not applied properly on the system. With this change that is no longer a issue. Signed-off-by: Luka Perkov --- diff --git a/bridge.c b/bridge.c index 05f2ad6..01c9a2c 100644 --- a/bridge.c +++ b/bridge.c @@ -454,12 +454,11 @@ bridge_config_init(struct device *dev) device_set_present(&bst->dev, true); } - if (!bst->ifnames) - return; - vlist_update(&bst->members); - blobmsg_for_each_attr(cur, bst->ifnames, rem) { - bridge_add_member(bst, blobmsg_data(cur)); + if (bst->ifnames) { + blobmsg_for_each_attr(cur, bst->ifnames, rem) { + bridge_add_member(bst, blobmsg_data(cur)); + } } vlist_flush(&bst->members); }