Title: IPv6 address still in duplicate address detection is skipped and never retried · Issue #1915 · python-zeroconf/python-zeroconf · GitHub
Open Graph Title: IPv6 address still in duplicate address detection is skipped and never retried · Issue #1915 · python-zeroconf/python-zeroconf
X Title: IPv6 address still in duplicate address detection is skipped and never retried · Issue #1915 · python-zeroconf/python-zeroconf
Description: Problem A link-local IPv6 address that is still in duplicate address detection (DAD, "tentative") cannot be bound. new_socket treats EADDRNOTAVAIL as benign, logs a warning and returns None, so the interface gets no responder socket. add...
Open Graph Description: Problem A link-local IPv6 address that is still in duplicate address detection (DAD, "tentative") cannot be bound. new_socket treats EADDRNOTAVAIL as benign, logs a warning and returns None, so the...
X Description: Problem A link-local IPv6 address that is still in duplicate address detection (DAD, "tentative") cannot be bound. new_socket treats EADDRNOTAVAIL as benign, logs a warning and returns No...
Opengraph URL: https://github.com/python-zeroconf/python-zeroconf/issues/1915
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"IPv6 address still in duplicate address detection is skipped and never retried","articleBody":"## Problem\n\nA link-local IPv6 address that is still in duplicate address detection (DAD, \"tentative\") cannot be bound. `new_socket` treats `EADDRNOTAVAIL` as benign, logs a warning and returns `None`, so the interface gets no responder socket. `add_interface` then drops the multicast group membership it had just joined for that interface.\n\nNothing retries the bind. Once DAD finishes (about a second later) the address is usable, but the address set has not changed, so a caller that reconciles on address changes has no reason to call `async_update_interfaces` again. The instance stays without IPv6 on that interface until some unrelated address change.\n\n## Where\n\n- [`new_socket`](https://github.com/python-zeroconf/python-zeroconf/blob/4b6bd74a84d7f3382d5475a27ff7fd6ed0f4ceaf/src/zeroconf/_utils/net.py#L268-L274) returns `None` on `EADDRNOTAVAIL`.\n- [`add_interface`](https://github.com/python-zeroconf/python-zeroconf/blob/4b6bd74a84d7f3382d5475a27ff7fd6ed0f4ceaf/src/zeroconf/_utils/net.py#L462-L480) drops the group membership when the responder socket could not be created.\n\nThis affects both construction (`create_sockets`) and `async_update_interfaces`.\n\n## Reproduce\n\nStart a container on an IPv6-enabled Docker network and construct `AsyncZeroconf(ip_version=IPVersion.All)` as soon as the process starts:\n\n```\ndocker network create --ipv6 --subnet fd00:dead:beef::/64 zc6test\ndocker run --rm --network zc6test \u003cimage> python -c \"...\"\n```\n\nLog output:\n\n```\nWARNING zeroconf: Address not available when binding to ('fe80::943f:67ff:fe01:cbb8', 5353, 0, 11), it is expected to happen on some systems\n```\n\nThe instance has an IPv4 sender only. Calling `async_update_interfaces()` a few seconds later binds the link-local sender.\n\nSeen with 0.151.2 on Linux (arm64, Python 3.13). The same window exists whenever an interface comes up shortly before construction or a reconcile, for example at container or host boot.\n\n## Suggested fix\n\nTreat `EADDRNOTAVAIL` on an IPv6 address as retryable: remember the interfaces skipped for that reason and schedule one short internal retry (a few seconds), for both construction and `async_update_interfaces`.\n\nFiltering tentative addresses up front is not an option, since `ifaddr` does not expose `IFA_F_TENTATIVE`.\n\n## Workaround\n\nesphome/device-builder#2864 runs one extra `async_update_interfaces` ten seconds after startup and after each binding change.\n","author":{"url":"https://github.com/bdraco","@type":"Person","name":"bdraco"},"datePublished":"2026-09-28T09:23:49Z","url":"https://github.com/python-zeroconf/python-zeroconf/issues/1915"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:50835b12-2a1c-44ea-e03e-0e0dd8daf5fe |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | BC1C:1534:8640:B28E:6B007D38 |
| html-safe-nonce | 8ee9097b38e5124918fc797ff60845aa85bb4a8a9095cd10a5fa4d6d6093ab83 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCQzFDOjE1MzQ6ODY0MDpCMjhFOjZCMDA3RDM4IiwidmlzaXRvcl9pZCI6IjY1MTc2NjI0NTM1NTQ1Mzc1MiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 435869ba3af28e009630d0c2db854e0cbe126c29d1bc69d454f9ccb5b19fa9b5 |
| hovercard-subject-tag | issue:5612287928 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/python-zeroconf/python-zeroconf/1915/issue_layout |
| twitter:image | https://opengraph.githubassets.com/1c29727b5432b339d7ed48dfca5933c6dba10f45608d3535b0619f48c0bb7012/python-zeroconf/python-zeroconf/issues/1915 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/1c29727b5432b339d7ed48dfca5933c6dba10f45608d3535b0619f48c0bb7012/python-zeroconf/python-zeroconf/issues/1915 |
| og:image:alt | Problem A link-local IPv6 address that is still in duplicate address detection (DAD, "tentative") cannot be bound. new_socket treats EADDRNOTAVAIL as benign, logs a warning and returns None, so the... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | bdraco |
| hostname | github.com |
| expected-hostname | github.com |
| None | 82c186f13e104004ab7bdb779f3195e59dd38bfde531aaa74b76470fc2462b83 |
| turbo-cache-control | no-preview |
| go-import | github.com/python-zeroconf/python-zeroconf git https://github.com/python-zeroconf/python-zeroconf.git |
| octolytics-dimension-user_id | 120192235 |
| octolytics-dimension-user_login | python-zeroconf |
| octolytics-dimension-repository_id | 21548731 |
| octolytics-dimension-repository_nwo | python-zeroconf/python-zeroconf |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 21548731 |
| octolytics-dimension-repository_network_root_nwo | python-zeroconf/python-zeroconf |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | d1bc2aa1939001689f5ce935982c10a6138f745c |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width