summaryrefslogtreecommitdiff
path: root/src/network/networkd-netdev.c
diff options
context:
space:
mode:
authorTom Gundersen <teg@jklm.no>2014-07-01 19:45:37 +0200
committerTom Gundersen <teg@jklm.no>2014-07-01 22:10:07 +0200
commit9e358851b470a1994287c8cb1d9eb78837faaf60 (patch)
tree016c47865e62add893cd2908e6729891378cb820 /src/network/networkd-netdev.c
parent4cc7a82c9490a3c5ae03b1d6d168ce40ba499e23 (diff)
networkd: netdev - add dummy support
Diffstat (limited to 'src/network/networkd-netdev.c')
-rw-r--r--src/network/networkd-netdev.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/network/networkd-netdev.c b/src/network/networkd-netdev.c
index 20917e334b..2fff962b58 100644
--- a/src/network/networkd-netdev.c
+++ b/src/network/networkd-netdev.c
@@ -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);