1
0
mirror of https://github.com/systemd/systemd.git synced 2024-12-28 11:21:59 +03:00

link-config: make MACAddressPolicy= accept an empty string

This commit is contained in:
Yu Watanabe 2020-11-20 22:48:59 +09:00
parent 5abede3247
commit d03cb6b85d

View File

@ -668,8 +668,12 @@ static const char* const mac_address_policy_table[_MAC_ADDRESS_POLICY_MAX] = {
};
DEFINE_STRING_TABLE_LOOKUP(mac_address_policy, MACAddressPolicy);
DEFINE_CONFIG_PARSE_ENUM(config_parse_mac_address_policy, mac_address_policy, MACAddressPolicy,
"Failed to parse MAC address policy");
DEFINE_CONFIG_PARSE_ENUM_WITH_DEFAULT(
config_parse_mac_address_policy,
mac_address_policy,
MACAddressPolicy,
MAC_ADDRESS_POLICY_NONE,
"Failed to parse MAC address policy");
static const char* const name_policy_table[_NAMEPOLICY_MAX] = {
[NAMEPOLICY_KERNEL] = "kernel",