summaryrefslogtreecommitdiff
path: root/src/network
diff options
context:
space:
mode:
Diffstat (limited to 'src/network')
-rw-r--r--src/network/networkd-link.c7
-rw-r--r--src/network/networkd-network-gperf.gperf1
-rw-r--r--src/network/networkd-network.c1
-rw-r--r--src/network/networkd.h2
4 files changed, 11 insertions, 0 deletions
diff --git a/src/network/networkd-link.c b/src/network/networkd-link.c
index 5f6c22a611..9e057ce0ff 100644
--- a/src/network/networkd-link.c
+++ b/src/network/networkd-link.c
@@ -2023,6 +2023,13 @@ static int link_configure(Link *link) {
return r;
}
}
+
+ if (link->network->dhcp_vendor_class_identifier) {
+ r = sd_dhcp_client_set_vendor_class_identifier(link->dhcp_client,
+ link->network->dhcp_vendor_class_identifier);
+ if (r < 0)
+ return r;
+ }
}
if (link->network->dhcp_server) {
diff --git a/src/network/networkd-network-gperf.gperf b/src/network/networkd-network-gperf.gperf
index 50cb0f8be9..5c1c013373 100644
--- a/src/network/networkd-network-gperf.gperf
+++ b/src/network/networkd-network-gperf.gperf
@@ -51,6 +51,7 @@ DHCP.UseDomainName, config_parse_bool, 0,
DHCP.UseRoutes, config_parse_bool, 0, offsetof(Network, dhcp_routes)
DHCP.SendHostname, config_parse_bool, 0, offsetof(Network, dhcp_sendhost)
DHCP.CriticalConnection, config_parse_bool, 0, offsetof(Network, dhcp_critical)
+DHCP.VendorClassIdentifier, config_parse_string, 0, offsetof(Network, dhcp_vendor_class_identifier)
/* backwards compatibility: do not add new entries to this section */
DHCPv4.UseDNS, config_parse_bool, 0, offsetof(Network, dhcp_dns)
DHCPv4.UseMTU, config_parse_bool, 0, offsetof(Network, dhcp_mtu)
diff --git a/src/network/networkd-network.c b/src/network/networkd-network.c
index 9f6de18538..c108ad2358 100644
--- a/src/network/networkd-network.c
+++ b/src/network/networkd-network.c
@@ -166,6 +166,7 @@ void network_free(Network *network) {
free(network->match_name);
free(network->description);
+ free(network->dhcp_vendor_class_identifier);
while ((address = network->ntp)) {
LIST_REMOVE(addresses, network->ntp, address);
diff --git a/src/network/networkd.h b/src/network/networkd.h
index aca3b8dd24..0f0ecd5c43 100644
--- a/src/network/networkd.h
+++ b/src/network/networkd.h
@@ -175,6 +175,8 @@ struct Network {
char *match_driver;
char *match_type;
char *match_name;
+ char *dhcp_vendor_class_identifier;
+
Condition *match_host;
Condition *match_virt;
Condition *match_kernel;