diff options
author | Jan Janssen <medhefgo@web.de> | 2015-03-03 19:49:48 +0100 |
---|---|---|
committer | Tom Gundersen <teg@jklm.no> | 2015-03-04 11:01:39 +0100 |
commit | 3e43b2cd97bd82efe6a09e8b9b2e6b5f33f578a0 (patch) | |
tree | c08352984781c8e266a7fa05e6db7b0c16158b38 /src/network/networkd-network.c | |
parent | ff88a301e93cf1bddbaa7faa981f390a2a81a4bb (diff) |
networkd: Make DHCP client ID creation configurable
Diffstat (limited to 'src/network/networkd-network.c')
-rw-r--r-- | src/network/networkd-network.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/network/networkd-network.c b/src/network/networkd-network.c index 0ba0c75714..f7f6eaf7fd 100644 --- a/src/network/networkd-network.c +++ b/src/network/networkd-network.c @@ -103,6 +103,7 @@ static int network_load_one(Manager *manager, const char *filename) { network->dhcp_routes = true; network->dhcp_sendhost = true; network->dhcp_route_metric = DHCP_ROUTE_METRIC; + network->dhcp_client_identifier = DHCP_CLIENT_ID_DUID; network->llmnr = LLMNR_SUPPORT_YES; @@ -600,6 +601,14 @@ int config_parse_dhcp( return 0; } +static const char* const dhcp_client_identifier_table[_DHCP_CLIENT_ID_MAX] = { + [DHCP_CLIENT_ID_MAC] = "mac", + [DHCP_CLIENT_ID_DUID] = "duid" +}; + +DEFINE_PRIVATE_STRING_TABLE_LOOKUP_FROM_STRING(dhcp_client_identifier, DCHPClientIdentifier); +DEFINE_CONFIG_PARSE_ENUM(config_parse_dhcp_client_identifier, dhcp_client_identifier, DCHPClientIdentifier, "Failed to parse client identifier type"); + static const char* const llmnr_support_table[_LLMNR_SUPPORT_MAX] = { [LLMNR_SUPPORT_NO] = "no", [LLMNR_SUPPORT_YES] = "yes", |