summaryrefslogtreecommitdiff
path: root/src/network/networkd-bridge.c
diff options
context:
space:
mode:
authorTom Gundersen <teg@jklm.no>2013-12-03 18:48:20 +0100
committerTom Gundersen <teg@jklm.no>2013-12-04 14:15:13 +0100
commitdd3efc0993b6e95ff04775e9125e2fc9d30fe261 (patch)
treedddf34390fd4dfdc399305a6b95c4dc9ebcc9c3a /src/network/networkd-bridge.c
parent50b3c42f971f4c9c7791c3b2831f6146ebd15e06 (diff)
networkd: add link-sense and simplify state-machine a bit
This listens to rtnetlink for changes to IFF_UP and IFF_LOWER_UP (link sense). The latter is simply logged at the moment, but will be useful once we add dhcp support.
Diffstat (limited to 'src/network/networkd-bridge.c')
-rw-r--r--src/network/networkd-bridge.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/network/networkd-bridge.c b/src/network/networkd-bridge.c
index e9dceab894..1704f65ee6 100644
--- a/src/network/networkd-bridge.c
+++ b/src/network/networkd-bridge.c
@@ -132,15 +132,17 @@ static int bridge_create_handler(sd_rtnl *rtnl, sd_rtnl_message *m, void *userda
r = sd_rtnl_message_get_errno(m);
if (r < 0) {
log_warning("Bridge '%s' failed: %s", bridge->name, strerror(-r));
- return bridge_enter_failed(bridge);
+ bridge_enter_failed(bridge);
+
+ return 1;
}
if (bridge->link)
- return bridge_enter_ready(bridge);
+ bridge_enter_ready(bridge);
bridge->state = BRIDGE_STATE_CREATED;
- return 0;
+ return 1;
}
static int bridge_create(Bridge *bridge) {