]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
Include 'vendor class identifier option' into DHCPREQUEST message (#5380)
authorAlexander Galanin <al@galanin.nnov.ru>
Mon, 20 Feb 2017 09:15:58 +0000 (13:15 +0400)
committerMartin Pitt <martinpitt@users.noreply.github.com>
Mon, 20 Feb 2017 09:15:58 +0000 (10:15 +0100)
src/libsystemd-network/sd-dhcp-client.c

index b4bf75a3dc2cda58fe8050e59567d0710398a669..7c0317640fa5e84485296608596e30a6383204a2 100644 (file)
@@ -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)