diff --git a/src/libsystemd-network/sd-dhcp-client.c b/src/libsystemd-network/sd-dhcp-client.c index 4b1cdd0b86..6b6a5ded42 100644 --- a/src/libsystemd-network/sd-dhcp-client.c +++ b/src/libsystemd-network/sd-dhcp-client.c @@ -1020,8 +1020,7 @@ static int client_append_common_discover_request_options(sd_dhcp_client *client, if (client->user_class) { r = dhcp_option_append(&packet->dhcp, optlen, optoffset, 0, SD_DHCP_OPTION_USER_CLASS, - strv_length(client->user_class), - client->user_class); + /* optlen= */ 0, client->user_class); if (r < 0) return r; } @@ -1037,7 +1036,7 @@ static int client_append_common_discover_request_options(sd_dhcp_client *client, r = dhcp_option_append( &packet->dhcp, optlen, optoffset, 0, SD_DHCP_OPTION_VENDOR_SPECIFIC, - ordered_hashmap_size(client->vendor_options), client->vendor_options); + /* optlen= */ 0, client->vendor_options); if (r < 0) return r; } diff --git a/src/libsystemd-network/sd-dhcp-server.c b/src/libsystemd-network/sd-dhcp-server.c index d1fe0e2273..d88480a346 100644 --- a/src/libsystemd-network/sd-dhcp-server.c +++ b/src/libsystemd-network/sd-dhcp-server.c @@ -719,7 +719,7 @@ static int server_send_offer_or_ack( r = dhcp_option_append( &packet->dhcp, req->max_optlen, &offset, 0, SD_DHCP_OPTION_VENDOR_SPECIFIC, - ordered_set_size(server->vendor_options), server->vendor_options); + /* optlen= */ 0, server->vendor_options); if (r < 0) return r; }