chiark / gitweb /
networkd: bridge - fix state machine
authorTom Gundersen <teg@jklm.no>
Tue, 17 Dec 2013 18:56:09 +0000 (19:56 +0100)
committerTom Gundersen <teg@jklm.no>
Tue, 17 Dec 2013 21:08:12 +0000 (22:08 +0100)
We were entering BRIDGE_STATE_CREATED rather than BRIDGE_STATE_READY.

src/network/networkd-bridge.c

index ed0d692..f110b8a 100644 (file)
@@ -139,8 +139,8 @@ static int bridge_create_handler(sd_rtnl *rtnl, sd_rtnl_message *m, void *userda
 
         if (bridge->link)
                 bridge_enter_ready(bridge);
-
-        bridge->state = BRIDGE_STATE_CREATED;
+        else
+                bridge->state = BRIDGE_STATE_CREATED;
 
         return 1;
 }