mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-05-09 05:58:01 +02:00
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:
parent
9c00eb5cb9
commit
4fcff3f34c
4 changed files with 7 additions and 17 deletions
|
|
@ -8217,8 +8217,7 @@ dhcp4_get_client_id (NMDevice *self,
|
||||||
if (nm_streq (client_id, "duid")) {
|
if (nm_streq (client_id, "duid")) {
|
||||||
guint32 iaid = dhcp_get_iaid (self, AF_INET, connection, NULL);
|
guint32 iaid = dhcp_get_iaid (self, AF_INET, connection, NULL);
|
||||||
|
|
||||||
result = nm_utils_dhcp_client_id_systemd_node_specific (TRUE,
|
result = nm_utils_dhcp_client_id_systemd_node_specific (iaid);
|
||||||
iaid);
|
|
||||||
goto out_good;
|
goto out_good;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -3522,9 +3522,6 @@ nm_utils_create_dhcp_iaid (gboolean legacy_unstable_byteorder,
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* nm_utils_dhcp_client_id_systemd_node_specific_full:
|
* 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
|
* @iaid: the IAID (identity association identifier) in native byte order
|
||||||
* @machine_id: the binary identifier for the machine. It is hashed
|
* @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).
|
* 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.
|
* Returns: a %GBytes of generated client-id. This function cannot fail.
|
||||||
*/
|
*/
|
||||||
GBytes *
|
GBytes *
|
||||||
nm_utils_dhcp_client_id_systemd_node_specific_full (gboolean legacy_unstable_byteorder,
|
nm_utils_dhcp_client_id_systemd_node_specific_full (guint32 iaid,
|
||||||
guint32 iaid,
|
|
||||||
const guint8 *machine_id,
|
const guint8 *machine_id,
|
||||||
gsize machine_id_len)
|
gsize machine_id_len)
|
||||||
{
|
{
|
||||||
|
|
@ -3578,11 +3574,9 @@ nm_utils_dhcp_client_id_systemd_node_specific_full (gboolean legacy_unstable_byt
|
||||||
}
|
}
|
||||||
|
|
||||||
GBytes *
|
GBytes *
|
||||||
nm_utils_dhcp_client_id_systemd_node_specific (gboolean legacy_unstable_byteorder,
|
nm_utils_dhcp_client_id_systemd_node_specific (guint32 iaid)
|
||||||
guint32 iaid)
|
|
||||||
{
|
{
|
||||||
return nm_utils_dhcp_client_id_systemd_node_specific_full (legacy_unstable_byteorder,
|
return nm_utils_dhcp_client_id_systemd_node_specific_full (iaid,
|
||||||
iaid,
|
|
||||||
(const guint8 *) nm_utils_machine_id_bin (),
|
(const guint8 *) nm_utils_machine_id_bin (),
|
||||||
sizeof (NMUuid));
|
sizeof (NMUuid));
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -388,13 +388,11 @@ guint32 nm_utils_create_dhcp_iaid (gboolean legacy_unstable_byteorder,
|
||||||
const guint8 *interface_id,
|
const guint8 *interface_id,
|
||||||
gsize interface_id_len);
|
gsize interface_id_len);
|
||||||
|
|
||||||
GBytes *nm_utils_dhcp_client_id_systemd_node_specific_full (gboolean legacy_unstable_byteorder,
|
GBytes *nm_utils_dhcp_client_id_systemd_node_specific_full (guint32 iaid,
|
||||||
guint32 iaid,
|
|
||||||
const guint8 *machine_id,
|
const guint8 *machine_id,
|
||||||
gsize machine_id_len);
|
gsize machine_id_len);
|
||||||
|
|
||||||
GBytes *nm_utils_dhcp_client_id_systemd_node_specific (gboolean legacy_unstable_byteorder,
|
GBytes *nm_utils_dhcp_client_id_systemd_node_specific (guint32 iaid);
|
||||||
guint32 iaid);
|
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2087,8 +2087,7 @@ test_nm_utils_dhcp_client_id_systemd_node_specific (gconstpointer test_data)
|
||||||
guint32 tmp;
|
guint32 tmp;
|
||||||
|
|
||||||
tmp = nm_utils_create_dhcp_iaid (TRUE, (const guint8 *) d->ifname, strlen (d->ifname));
|
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,
|
client_id = nm_utils_dhcp_client_id_systemd_node_specific_full (tmp,
|
||||||
tmp,
|
|
||||||
(const guint8 *) &d->machine_id,
|
(const guint8 *) &d->machine_id,
|
||||||
sizeof (d->machine_id));
|
sizeof (d->machine_id));
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue