networkd: fix for 3692 (#3699)
authorSusant Sahani <ssahani@users.noreply.github.com>
Fri, 15 Jul 2016 16:50:51 +0000 (22:20 +0530)
committerLennart Poettering <lennart@poettering.net>
Fri, 15 Jul 2016 16:50:51 +0000 (18:50 +0200)
We should look that the kind is invalid rather than pointer is NULL.

src/network/networkd-netdev.c

index b192884..e7edc36 100644 (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;
         }