Skip to content

dhcp: reset IPv6 DAD flag on lease update

Beniamino Galvani requested to merge bg/dhcp6-dad-assertion into main

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: 393bc628 ('dhcp: wait DAD completion for DHCPv6 addresses')

https://bugzilla.redhat.com/show_bug.cgi?id=2179890

Merge request reports

Loading