diff options
author | Thomas Haller <thaller@redhat.com> | 2022-12-12 19:15:09 +0100 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2022-12-19 11:29:11 +0100 |
commit | 05ae48d64e3e5afd2fc8433ac965bc61b0a1f647 (patch) | |
tree | 6563557b61e3e14b40323c4c1aeeefd6683b4273 | |
parent | 9073628bd61a71ada5d87cfc0304c28d0bdc4291 (diff) | |
download | NetworkManager-05ae48d64e3e5afd2fc8433ac965bc61b0a1f647.tar.gz |
dhcp: don't use nm_dhcp_client_get_effective_client_id() from systemd DHCPv6 client
The "effective-client-id" is handled wrongly. Step 1 to clean this up.
Note that NMDhcpClientPrivate.effective_client_id is only ever get/set
via the nm_dhcp_client_[gs]et_effective_client_id() functions.
Note that only a NMDhcpDhclient instance ever calls
nm_dhcp_client_set_effective_client_id().
Hence, for NMDhcpSystemd the effective-client-id is really just the DUID
from the config. Clean this up by not calling nm_dhcp_client_get_effective_client_id()
but use the config directly. There is no change in behavior here.
-rw-r--r-- | src/core/dhcp/nm-dhcp-systemd.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/core/dhcp/nm-dhcp-systemd.c b/src/core/dhcp/nm-dhcp-systemd.c index ff83cec574..3b6ba96d48 100644 --- a/src/core/dhcp/nm-dhcp-systemd.c +++ b/src/core/dhcp/nm-dhcp-systemd.c @@ -271,7 +271,7 @@ ip6_start(NMDhcpClient *client, const struct in6_addr *ll_addr, GError **error) /* TODO: honor nm_dhcp_client_get_anycast_address() */ - duid = nm_dhcp_client_get_effective_client_id(client); + duid = client_config->client_id; if (!duid || !(duid_arr = g_bytes_get_data(duid, &duid_len)) || duid_len < 2) { nm_utils_error_set_literal(error, NM_UTILS_ERROR_UNKNOWN, "missing DUID"); g_return_val_if_reached(FALSE); |