summaryrefslogtreecommitdiffstats
path: root/src/udev/net/link-config.c
diff options
context:
space:
mode:
authorJacob Keller <jacob.keller@gmail.com>2015-10-05 23:14:45 +0200
committerJacob Keller <jacob.keller@gmail.com>2015-10-06 00:55:25 +0200
commit66d3752e812915a549ebee01769ee761c1495667 (patch)
tree7bd93a579f4cae53338111b47793418c5469bccb /src/udev/net/link-config.c
parentMerge pull request #1462 from lnykryn/analyze-manpage (diff)
downloadsystemd-66d3752e812915a549ebee01769ee761c1495667.tar.xz
systemd-66d3752e812915a549ebee01769ee761c1495667.zip
document ability to disable MACAddressPolicy
While it is currently possible to either not set MACAddressPolicy or set it to a value different from "persistent" or "random", it is not obvious that a user can do so. Add a policy, "none", which simply retains kernel MAC addresses (same as not filling in the policy at all) and document it so that users are aware of this setting. Signed-off-by: Jacob Keller <jacob.keller@gmail.com>
Diffstat (limited to 'src/udev/net/link-config.c')
-rw-r--r--src/udev/net/link-config.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/udev/net/link-config.c b/src/udev/net/link-config.c
index 63e54db56e..4b8c5053a4 100644
--- a/src/udev/net/link-config.c
+++ b/src/udev/net/link-config.c
@@ -460,6 +460,7 @@ int link_config_apply(link_config_ctx *ctx, link_config *config,
mac = &generated_mac;
}
break;
+ case MACPOLICY_NONE:
default:
mac = config->mac;
}
@@ -492,7 +493,8 @@ int link_get_driver(link_config_ctx *ctx, struct udev_device *device, char **ret
static const char* const mac_policy_table[_MACPOLICY_MAX] = {
[MACPOLICY_PERSISTENT] = "persistent",
- [MACPOLICY_RANDOM] = "random"
+ [MACPOLICY_RANDOM] = "random",
+ [MACPOLICY_NONE] = "none"
};
DEFINE_STRING_TABLE_LOOKUP(mac_policy, MACPolicy);