From 5153494f1d343e144ea58e1299ae956473064b5e Mon Sep 17 00:00:00 2001 From: Alexander Galanin Date: Mon, 20 Feb 2017 13:15:58 +0400 Subject: Include 'vendor class identifier option' into DHCPREQUEST message (#5380) --- src/libsystemd-network/sd-dhcp-client.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src') diff --git a/src/libsystemd-network/sd-dhcp-client.c b/src/libsystemd-network/sd-dhcp-client.c index b4bf75a3dc..7c0317640f 100644 --- a/src/libsystemd-network/sd-dhcp-client.c +++ b/src/libsystemd-network/sd-dhcp-client.c @@ -825,6 +825,15 @@ static int client_send_request(sd_dhcp_client *client) { return r; } + if (client->vendor_class_identifier) { + r = dhcp_option_append(&request->dhcp, optlen, &optoffset, 0, + SD_DHCP_OPTION_VENDOR_CLASS_IDENTIFIER, + strlen(client->vendor_class_identifier), + client->vendor_class_identifier); + if (r < 0) + return r; + } + r = dhcp_option_append(&request->dhcp, optlen, &optoffset, 0, SD_DHCP_OPTION_END, 0, NULL); if (r < 0) -- cgit v1.2.3-54-g00ecf