diff options
author | David Michael <david.michael@coreos.com> | 2016-09-27 15:18:14 -0700 |
---|---|---|
committer | David Michael <david.michael@coreos.com> | 2016-12-01 14:41:51 -0800 |
commit | a09dc5467a3d289a53ef3ea87d3b155d8d0551c9 (patch) | |
tree | 85a69dde6004c10cc899c9010dc4e649509c1cfc /src | |
parent | ec89276c2ab345b84c2dab4c35826de41aa6fd0f (diff) |
networkd: support marking links unmanaged
Diffstat (limited to 'src')
-rw-r--r-- | src/network/networkd-link.c | 3 | ||||
-rw-r--r-- | src/network/networkd-network-gperf.gperf | 1 | ||||
-rw-r--r-- | src/network/networkd-network.h | 1 |
3 files changed, 5 insertions, 0 deletions
diff --git a/src/network/networkd-link.c b/src/network/networkd-link.c index cb7df633b7..643578c164 100644 --- a/src/network/networkd-link.c +++ b/src/network/networkd-link.c @@ -2523,6 +2523,9 @@ static int link_initialized_and_synced(sd_netlink *rtnl, sd_netlink_message *m, if (r == -ENOENT) { link_enter_unmanaged(link); return 1; + } else if (r == 0 && network->unmanaged) { + link_enter_unmanaged(link); + return 0; } else if (r < 0) return r; diff --git a/src/network/networkd-network-gperf.gperf b/src/network/networkd-network-gperf.gperf index 463f4595c1..0a5cd763dd 100644 --- a/src/network/networkd-network-gperf.gperf +++ b/src/network/networkd-network-gperf.gperf @@ -29,6 +29,7 @@ Match.Architecture, config_parse_net_condition, Link.MACAddress, config_parse_hwaddr, 0, offsetof(Network, mac) Link.MTUBytes, config_parse_iec_size, 0, offsetof(Network, mtu) Link.ARP, config_parse_tristate, 0, offsetof(Network, arp) +Link.Unmanaged, config_parse_bool, 0, offsetof(Network, unmanaged) Network.Description, config_parse_string, 0, offsetof(Network, description) Network.Bridge, config_parse_netdev, 0, offsetof(Network, bridge) Network.Bond, config_parse_netdev, 0, offsetof(Network, bond) diff --git a/src/network/networkd-network.h b/src/network/networkd-network.h index 4dbc19fc3b..e05dccda29 100644 --- a/src/network/networkd-network.h +++ b/src/network/networkd-network.h @@ -176,6 +176,7 @@ struct Network { struct ether_addr *mac; size_t mtu; int arp; + bool unmanaged; uint32_t iaid; DUID duid; |