Title: async_update_interfaces does not report whether the requested interfaces were bound · Issue #1916 · python-zeroconf/python-zeroconf · GitHub
Open Graph Title: async_update_interfaces does not report whether the requested interfaces were bound · Issue #1916 · python-zeroconf/python-zeroconf
X Title: async_update_interfaces does not report whether the requested interfaces were bound · Issue #1916 · python-zeroconf/python-zeroconf
Description: Problem Zeroconf.async_update_interfaces is best-effort and returns None, so a caller cannot tell whether the requested configuration was applied. Two failure paths are logged and swallowed: A listen socket rebuild that fails, for exampl...
Open Graph Description: Problem Zeroconf.async_update_interfaces is best-effort and returns None, so a caller cannot tell whether the requested configuration was applied. Two failure paths are logged and swallowed: A list...
X Description: Problem Zeroconf.async_update_interfaces is best-effort and returns None, so a caller cannot tell whether the requested configuration was applied. Two failure paths are logged and swallowed: A list...
Opengraph URL: https://github.com/python-zeroconf/python-zeroconf/issues/1916
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"async_update_interfaces does not report whether the requested interfaces were bound","articleBody":"## Problem\n\n`Zeroconf.async_update_interfaces` is best-effort and returns `None`, so a caller cannot tell whether the requested configuration was applied.\n\nTwo failure paths are logged and swallowed:\n\n- A listen socket rebuild that fails, for example switching an IPv4 instance to `IPVersion.All` on a host that cannot open a dual-stack `AF_INET6` socket. The engine logs `Skipping interface update; listen socket rebuild failed` and returns `False`.\n- A requested interface that fails to bind. The engine logs `Interface ... not added` once and carries on.\n\nIn both cases `Zeroconf.async_update_interfaces` still commits the requested `interfaces` and `ip_version` as the retained configuration, and returns normally.\n\n## Where\n\n- [Engine rebuild failure](https://github.com/python-zeroconf/python-zeroconf/blob/4b6bd74a84d7f3382d5475a27ff7fd6ed0f4ceaf/src/zeroconf/_engine.py#L179-L188) returns `False`, the same value as \"nothing was added\".\n- [`_async_add_interface`](https://github.com/python-zeroconf/python-zeroconf/blob/4b6bd74a84d7f3382d5475a27ff7fd6ed0f4ceaf/src/zeroconf/_engine.py#L238-L256) returns `False` for an interface that did not come up.\n- [`Zeroconf.async_update_interfaces`](https://github.com/python-zeroconf/python-zeroconf/blob/4b6bd74a84d7f3382d5475a27ff7fd6ed0f4ceaf/src/zeroconf/_core.py#L414-L457) uses the engine's result only to decide whether to re-announce.\n\n## Why it matters\n\nA caller that asks for dual-stack and cannot get it has no signal to fall back to `IPVersion.V4Only`, or to retry later. It also cannot log an accurate outcome: a caller that logs \"reconciled with IPVersion.All\" after a swallowed rebuild failure is wrong.\n\nIn esphome/device-builder#2864 this meant a runtime IPv4-only fallback could not be implemented, because the failure it would react to never surfaces.\n\n## Suggested fix\n\nReport the outcome from the public method. Options:\n\n- Return whether the desired interface set fully bound, or the list of interfaces that were skipped.\n- Raise when the address family rebuild fails, since in that case none of the requested change was applied.\n\nEither keeps the best-effort behaviour for per-interface failures while letting callers react.\n","author":{"url":"https://github.com/bdraco","@type":"Person","name":"bdraco"},"datePublished":"2026-09-28T09:23:51Z","url":"https://github.com/python-zeroconf/python-zeroconf/issues/1916"}
| 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:ae88b00b-b3b1-108f-2b3b-49623a508d74 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | BC02:3F3B2D:67A7:88C5:6B007D37 |
| html-safe-nonce | a43c2901f50b5cefc7d048611bbcb345aee9838a80aac06c31d5a494124aa512 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCQzAyOjNGM0IyRDo2N0E3Ojg4QzU6NkIwMDdEMzciLCJ2aXNpdG9yX2lkIjoiMjMyNDE2NTU5OTE5MTY2MTg3OSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 9369e614592cde0ad44dc02172d1b561789e75b09f5cb2c31454f9b967fb22a9 |
| hovercard-subject-tag | issue:5612288200 |
| 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/1916/issue_layout |
| twitter:image | https://opengraph.githubassets.com/34986f44a9b816d8a24d12bdf48befaa5c8722dc2502de036b29309fcbd2a43c/python-zeroconf/python-zeroconf/issues/1916 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/34986f44a9b816d8a24d12bdf48befaa5c8722dc2502de036b29309fcbd2a43c/python-zeroconf/python-zeroconf/issues/1916 |
| og:image:alt | Problem Zeroconf.async_update_interfaces is best-effort and returns None, so a caller cannot tell whether the requested configuration was applied. Two failure paths are logged and swallowed: A list... |
| 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