networkd: fix for 3692 (#3699)

We should look that the kind is invalid rather than pointer is NULL.
This commit is contained in:
Susant Sahani
2016-07-15 22:20:51 +05:30
committed by Lennart Poettering
parent 542127ea96
commit 2f27e2c556

View File

@@ -619,7 +619,7 @@ static int netdev_load_one(Manager *manager, const char *filename) {
NULL, NULL, NULL, NULL, NULL, NULL) <= 0)
return 0;
if (!NETDEV_VTABLE(netdev_raw)) {
if (netdev_raw->kind == _NETDEV_KIND_INVALID) {
log_warning("NetDev with invalid Kind configured in %s. Ignoring", filename);
return 0;
}