]> git.ipfire.org Git - thirdparty/systemd.git/blobdiff - src/network/networkd-dhcp4.c
tree-wide: drop 'This file is part of systemd' blurb
[thirdparty/systemd.git] / src / network / networkd-dhcp4.c
index a1d300166bc56143a58a4cc0a7007993e1a73232..82f41bc7082a2cc79db4333fec4a88a2eaf5fb44 100644 (file)
@@ -1,7 +1,5 @@
 /* SPDX-License-Identifier: LGPL-2.1+ */
 /***
-  This file is part of systemd.
-
   Copyright 2013-2014 Tom Gundersen <teg@jklm.no>
 ***/
 
@@ -444,8 +442,7 @@ static int dhcp_lease_acquired(sd_dhcp_client *client, Link *link) {
                                             ADDRESS_FMT_VAL(gateway)),
                            "ADDRESS=%u.%u.%u.%u", ADDRESS_FMT_VAL(address),
                            "PREFIXLEN=%u", prefixlen,
-                           "GATEWAY=%u.%u.%u.%u", ADDRESS_FMT_VAL(gateway),
-                           NULL);
+                           "GATEWAY=%u.%u.%u.%u", ADDRESS_FMT_VAL(gateway));
         else
                 log_struct(LOG_INFO,
                            LOG_LINK_INTERFACE(link),
@@ -453,8 +450,7 @@ static int dhcp_lease_acquired(sd_dhcp_client *client, Link *link) {
                                             ADDRESS_FMT_VAL(address),
                                             prefixlen),
                            "ADDRESS=%u.%u.%u.%u", ADDRESS_FMT_VAL(address),
-                           "PREFIXLEN=%u", prefixlen,
-                           NULL);
+                           "PREFIXLEN=%u", prefixlen);
 
         link->dhcp_lease = sd_dhcp_lease_ref(lease);
         link_dirty(link);
@@ -748,6 +744,12 @@ int dhcp4_configure(Link *link) {
                         return r;
         }
 
+        if (link->network->dhcp_user_class) {
+                r = sd_dhcp_client_set_user_class(link->dhcp_client, (const char **) link->network->dhcp_user_class);
+                if (r < 0)
+                        return r;
+        }
+
         if (link->network->dhcp_client_port) {
                 r = sd_dhcp_client_set_client_port(link->dhcp_client, link->network->dhcp_client_port);
                 if (r < 0)