core: remove 'legacy_unstable_byteorder' argument from client-id helpers

The argument has no effect because the order only influences IAID
generation.
This commit is contained in:
Beniamino Galvani 2019-12-02 11:29:13 +01:00
parent 9c00eb5cb9
commit 4fcff3f34c
4 changed files with 7 additions and 17 deletions

View file

@ -8217,8 +8217,7 @@ dhcp4_get_client_id (NMDevice *self,
if (nm_streq (client_id, "duid")) {
guint32 iaid = dhcp_get_iaid (self, AF_INET, connection, NULL);
result = nm_utils_dhcp_client_id_systemd_node_specific (TRUE,
iaid);
result = nm_utils_dhcp_client_id_systemd_node_specific (iaid);
goto out_good;
}

View file

@ -3522,9 +3522,6 @@ nm_utils_create_dhcp_iaid (gboolean legacy_unstable_byteorder,
/**
* nm_utils_dhcp_client_id_systemd_node_specific_full:
* @legacy_unstable_byteorder: historically, the code would generate a iaid
* dependent on host endianness. This is undesirable, if backward compatibility
* are not a concern, generate stable endianness.
* @iaid: the IAID (identity association identifier) in native byte order
* @machine_id: the binary identifier for the machine. It is hashed
* into the DUID. It commonly is /etc/machine-id (parsed in binary as NMUuid).
@ -3537,8 +3534,7 @@ nm_utils_create_dhcp_iaid (gboolean legacy_unstable_byteorder,
* Returns: a %GBytes of generated client-id. This function cannot fail.
*/
GBytes *
nm_utils_dhcp_client_id_systemd_node_specific_full (gboolean legacy_unstable_byteorder,
guint32 iaid,
nm_utils_dhcp_client_id_systemd_node_specific_full (guint32 iaid,
const guint8 *machine_id,
gsize machine_id_len)
{
@ -3578,11 +3574,9 @@ nm_utils_dhcp_client_id_systemd_node_specific_full (gboolean legacy_unstable_byt
}
GBytes *
nm_utils_dhcp_client_id_systemd_node_specific (gboolean legacy_unstable_byteorder,
guint32 iaid)
nm_utils_dhcp_client_id_systemd_node_specific (guint32 iaid)
{
return nm_utils_dhcp_client_id_systemd_node_specific_full (legacy_unstable_byteorder,
iaid,
return nm_utils_dhcp_client_id_systemd_node_specific_full (iaid,
(const guint8 *) nm_utils_machine_id_bin (),
sizeof (NMUuid));
}

View file

@ -388,13 +388,11 @@ guint32 nm_utils_create_dhcp_iaid (gboolean legacy_unstable_byteorder,
const guint8 *interface_id,
gsize interface_id_len);
GBytes *nm_utils_dhcp_client_id_systemd_node_specific_full (gboolean legacy_unstable_byteorder,
guint32 iaid,
GBytes *nm_utils_dhcp_client_id_systemd_node_specific_full (guint32 iaid,
const guint8 *machine_id,
gsize machine_id_len);
GBytes *nm_utils_dhcp_client_id_systemd_node_specific (gboolean legacy_unstable_byteorder,
guint32 iaid);
GBytes *nm_utils_dhcp_client_id_systemd_node_specific (guint32 iaid);
/*****************************************************************************/

View file

@ -2087,8 +2087,7 @@ test_nm_utils_dhcp_client_id_systemd_node_specific (gconstpointer test_data)
guint32 tmp;
tmp = nm_utils_create_dhcp_iaid (TRUE, (const guint8 *) d->ifname, strlen (d->ifname));
client_id = nm_utils_dhcp_client_id_systemd_node_specific_full (legacy_unstable_byteorder,
tmp,
client_id = nm_utils_dhcp_client_id_systemd_node_specific_full (tmp,
(const guint8 *) &d->machine_id,
sizeof (d->machine_id));