diff options
author | Beniamino Galvani <bgalvani@redhat.com> | 2023-04-05 11:25:29 +0200 |
---|---|---|
committer | Beniamino Galvani <bgalvani@redhat.com> | 2023-04-06 15:56:59 +0200 |
commit | 24461954d0063f1017caa850b8aafe660c564d10 (patch) | |
tree | 201b879e4140af4520b5b82011b0a631e28875c5 | |
parent | 23beb28771f0b64f824045b2d59285d38e111ed2 (diff) | |
download | NetworkManager-24461954d0063f1017caa850b8aafe660c564d10.tar.gz |
dhcp: reset IPv6 DAD flag on lease updatebg/dhcp6-dad-assertion
If the client was waiting for IPv6 DAD to complete and the lease was
updated or lost, `wait_ipv6_dad` needs to be cleared; otherwise, at
the next platform change the client will try to evaluate the DAD state
with a different or no lease. In particular if there is no lease the
client will try to decline it because there are no valid addresses,
leading to an assertion failure:
../src/core/dhcp/nm-dhcp-client.c:997:_dhcp_client_decline: assertion failed: (l3cd)
Backtrace:
__GI_raise ()
__GI_abort ()
g_assertion_message ()
g_assertion_message_expr ()
_dhcp_client_decline (self=0x1af13b0, l3cd=0x0, error_message=0x8e25e1 "DAD failed", error=0x7ffec2c45cb0) at ../src/core/dhcp/nm-dhcp-client.c:997
l3_cfg_notify_cb (l3cfg=0x1bc47f0, notify_data=0x7ffec2c46c60, self=0x1af13b0) at ../src/core/dhcp/nm-dhcp-client.c:1190
g_closure_invoke ()
g_signal_emit_valist ()
g_signal_emit ()
_nm_l3cfg_emit_signal_notify () at ../src/core/nm-l3cfg.c:629
_nm_l3cfg_notify_platform_change_on_idle () at ../src/core/nm-l3cfg.c:1390
_platform_signal_on_idle_cb () at ../src/core/nm-netns.c:411
g_idle_dispatch ()
Fixes: 393bc628ff69 ('dhcp: wait DAD completion for DHCPv6 addresses')
https://bugzilla.redhat.com/show_bug.cgi?id=2179890
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/1594
-rw-r--r-- | src/core/dhcp/nm-dhcp-client.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/core/dhcp/nm-dhcp-client.c b/src/core/dhcp/nm-dhcp-client.c index 1fc2d94461..b10ce41063 100644 --- a/src/core/dhcp/nm-dhcp-client.c +++ b/src/core/dhcp/nm-dhcp-client.c @@ -871,6 +871,7 @@ _nm_dhcp_client_notify(NMDhcpClient *self, nm_clear_g_source_inst(&priv->previous_lease_timeout_source); nm_l3_config_data_reset(&priv->l3cd_curr, priv->l3cd_next); + priv->l3cfg_notify.wait_ipv6_dad = FALSE; if (client_event_type == NM_DHCP_CLIENT_EVENT_TYPE_BOUND && priv->l3cd_curr && nm_l3_config_data_get_num_addresses(priv->l3cd_curr, priv->config.addr_family) > 0) |