]> git.ipfire.org Git - thirdparty/systemd.git/blobdiff - src/libsystemd-network/sd-dhcp-client.c
dhcp: fix sd_dhcp_client_set_client_id() for infiniband addresses
[thirdparty/systemd.git] / src / libsystemd-network / sd-dhcp-client.c
index 3bdd584bb55858852d53feb2d29dc30bf987c90a..ff7f54793443558100418a498bce5a6adbb3bce5 100644 (file)
@@ -308,7 +308,9 @@ int sd_dhcp_client_set_client_id(
                 break;
 
         case ARPHRD_INFINIBAND:
-                if (data_len != INFINIBAND_ALEN)
+                /* Infiniband addresses are 20 bytes (INFINIBAND_ALEN), however only
+                 * the last 8 bytes are stable and suitable for putting into the client-id. */
+                if (data_len != 8)
                         return -EINVAL;
                 break;