Merge pull request #4228 from dm0-/coreos-1554
networkd: support marking links unmanaged
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -176,6 +176,7 @@ struct Network {
|
||||
struct ether_addr *mac;
|
||||
size_t mtu;
|
||||
int arp;
|
||||
bool unmanaged;
|
||||
uint32_t iaid;
|
||||
DUID duid;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user