networkd: netdev - drop if creation fails

This ensures that all links waiting to be enslaved are notified that the netdev does not exist.
This commit is contained in:
Tom Gundersen
2014-05-09 14:41:27 +02:00
parent 370e9930c3
commit 37ebeb77cf
+2 -2
View File
@@ -219,8 +219,8 @@ static int netdev_create_handler(sd_rtnl *rtnl, sd_rtnl_message *m, void *userda
if (r == -EEXIST)
log_debug_netdev(netdev, "netdev exists, using existing");
else if (r < 0) {
log_warning_netdev(netdev, "netdev failed: %s", strerror(-r));
netdev_enter_failed(netdev);
log_warning_netdev(netdev, "netdev could not be greated: %s", strerror(-r));
netdev_drop(netdev);
return 1;
}