diff options
author | Alexander Galanin <al@galanin.nnov.ru> | 2017-02-20 13:15:58 +0400 |
---|---|---|
committer | Martin Pitt <martinpitt@users.noreply.github.com> | 2017-02-20 10:15:58 +0100 |
commit | 5153494f1d343e144ea58e1299ae956473064b5e (patch) | |
tree | 8a321736cffce902c4d63d25f6fd72a4f0050dea | |
parent | 6862111ecf9e69a1bc400bda449f410885e0c7a3 (diff) |
Include 'vendor class identifier option' into DHCPREQUEST message (#5380)
-rw-r--r-- | src/libsystemd-network/sd-dhcp-client.c | 9 |
1 files changed, 9 insertions, 0 deletions
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) |