summaryrefslogtreecommitdiffhomepage
path: root/bridge.c
diff options
context:
space:
mode:
authorHelmut Schaa <helmut.schaa@googlemail.com>2014-03-20 16:26:23 +0100
committerFelix Fietkau <nbd@openwrt.org>2014-03-21 16:05:20 +0100
commit3d317e90f15eec480b23f4dcddb841c292bef690 (patch)
tree23bd42c83bd676a029fe4536d68de414a606d7c9 /bridge.c
parent559df99f259e88edaa7e45826a0ff436f2a07d1a (diff)
netifd: Reload proto on topology change
Introduce a new device event "topology change" that gets signaled by bridges on adding/removing members. On "topology changes" the proto handlers are requested to "renew" which is most useful for DHCP. Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
Diffstat (limited to 'bridge.c')
-rw-r--r--bridge.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/bridge.c b/bridge.c
index 147fe0a..6baef29 100644
--- a/bridge.c
+++ b/bridge.c
@@ -140,6 +140,8 @@ bridge_disable_member(struct bridge_member *bm)
system_bridge_delif(&bst->dev, bm->dev.dev);
device_release(&bm->dev);
+ device_broadcast_event(&bst->dev, DEV_EVENT_TOPO_CHANGE);
+
return 0;
}
@@ -162,6 +164,8 @@ bridge_enable_member(struct bridge_member *bm)
goto error;
}
+ device_broadcast_event(&bst->dev, DEV_EVENT_TOPO_CHANGE);
+
return 0;
error: