aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/libsystemd-network/sd-dhcp-client.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/libsystemd-network/sd-dhcp-client.c b/src/libsystemd-network/sd-dhcp-client.c
index 3bdd584bb..ff7f54793 100644
--- a/src/libsystemd-network/sd-dhcp-client.c
+++ b/src/libsystemd-network/sd-dhcp-client.c
@@ -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;