chiark / gitweb /
networkd: netdev - add dummy support
[elogind.git] / src / network / networkd-netdev.c
index 20917e3..2fff962 100644 (file)
@@ -41,7 +41,8 @@ static const char* const netdev_kind_table[_NETDEV_KIND_MAX] = {
         [NETDEV_KIND_GRE] = "gre",
         [NETDEV_KIND_SIT] = "sit",
         [NETDEV_KIND_VETH] = "veth",
-        [NETDEV_KIND_VTI] = "vti"
+        [NETDEV_KIND_VTI] = "vti",
+        [NETDEV_KIND_DUMMY] = "dummy",
 };
 
 DEFINE_STRING_TABLE_LOOKUP(netdev_kind, NetDevKind);
@@ -718,6 +719,14 @@ static int netdev_load_one(Manager *manager, const char *filename) {
                         return r;
 
                 break;
+        case NETDEV_KIND_DUMMY:
+                r = netdev_create_dummy(netdev, netdev_create_handler);
+                if (r < 0)
+                        return r;
+
+                netdev_ref(netdev);
+
+                break;
         case NETDEV_KIND_BRIDGE:
         case NETDEV_KIND_BOND:
                 r = netdev_create(netdev, NULL, NULL);