Page MenuHomeFreeBSD

netinet6: Periodically retry DAD for IPv6 addresses marked as duplicated
Needs ReviewPublic

Authored by amy.vargas_netapp.com on Fri, Jan 16, 7:52 PM.
Tags
None
Referenced Files
F142541903: D54749.diff
Tue, Jan 20, 7:32 PM
Unknown Object (File)
Sat, Jan 17, 5:43 AM
Unknown Object (File)
Sat, Jan 17, 2:55 AM
Unknown Object (File)
Sat, Jan 17, 1:57 AM
Unknown Object (File)
Fri, Jan 16, 10:40 PM
Unknown Object (File)
Fri, Jan 16, 10:24 PM
Unknown Object (File)
Fri, Jan 16, 8:39 PM

Details

Reviewers
None
Group Reviewers
NetApp
network
Klara
Summary

When Duplicate Address Detection (DAD) fails for an IPv6 address, the address is marked as duplicated and remains unusable. In some cases, this is due to transient conditions, such as another host being slow to remove the address. To improve address recovery, this change introduces logic to periodically retry DAD for addresses in the duplicated state.

A new per-address counter and timestamp track the number and timing of DAD restarts. The maximum number of retries is configurable via the net.inet6.ip6.dad_restart sysctl (default: 10). Retries are attempted at a fixed interval (default: 30 seconds), and DAD is restarted only if the address remains duplicated and not detached.

This enhancement helps automatically recover IPv6 addresses that become available again, reducing the need for manual intervention in high-availability or failover environments.

Test Plan

Executed the following tests on an image with this change. All passed with the exception of the ones listed below.

net/if_clone* - All passed

netinet6* - All passed except:

  • SKIPPED: netinet6/test_ip6_output.py:test_cases_list_pytest_binary_not_found: REASON: pytest not installed
  • SKIPPED: netinet6/frag6/frag6_01:frag6_01: REASON: ending IPv6 Jumbograms needs 1 kernel changes and BPF fixes
  • FAILED: netinet6/frag6/frag6_19:frag6_19: REASON: Global IPv6 statistics do not match: 19 != 20: This same test also fails without my changes.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped