René's URL Explorer Experiment


Title: mdns-repeater causes ChromeCast Audio devices to cease broadcasting mDNS responses when interface MTU exceeded · Issue #245 · python-zeroconf/python-zeroconf · GitHub

Open Graph Title: mdns-repeater causes ChromeCast Audio devices to cease broadcasting mDNS responses when interface MTU exceeded · Issue #245 · python-zeroconf/python-zeroconf

X Title: mdns-repeater causes ChromeCast Audio devices to cease broadcasting mDNS responses when interface MTU exceeded · Issue #245 · python-zeroconf/python-zeroconf

Description: Because I'm not sure of the right set of fixes, I'm filing this issue with each of: Google Chromecast/Home Team (via email), https://github.com/jstasiak/python-zeroconf, https://github.com/kennylevinsen/mdns-repeater, https://github.com/...

Open Graph Description: Because I'm not sure of the right set of fixes, I'm filing this issue with each of: Google Chromecast/Home Team (via email), https://github.com/jstasiak/python-zeroconf, https://github.com/kennylev...

X Description: Because I'm not sure of the right set of fixes, I'm filing this issue with each of: Google Chromecast/Home Team (via email), https://github.com/jstasiak/python-zeroconf, https://github.com/...

Opengraph URL: https://github.com/python-zeroconf/python-zeroconf/issues/245

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"mdns-repeater causes ChromeCast Audio devices to cease broadcasting mDNS responses when interface MTU exceeded","articleBody":"Because I'm not sure of the right set of fixes, I'm filing this issue with each of:\r\nGoogle Chromecast/Home Team (via email),\r\nhttps://github.com/jstasiak/python-zeroconf,\r\nhttps://github.com/kennylevinsen/mdns-repeater,\r\nhttps://github.com/home-assistant/plugin-multicast, and\r\nhttps://github.com/home-assistant/core\r\n\r\nI just spent the weekend tracking this down as I apparently started using mdns-repeater\r\nunwittingly due to a change in HomeAssistant's hass.io and its new\r\nmulticast plugin\r\n(https://github.com/home-assistant/plugin-multicast). That resulted in\r\na revival of some terrible instability in my 30+ Google ChromeCast\r\nAudio (CCA) devices in my home -- the problem had gone away a couple\r\nmonths ago and I'd attributed it to IGMP issues, but I peeled the\r\nonion and this is what I found.\r\n\r\nBUG #1 CHROMECAST AUDIO DEVICE PROCESS CRASHES ENDING mDNS:\r\n\r\nThe mDNS announcing process of Google Chromecast Audios (a\r\ndiscontinued product, unfortunately) dies when triggered by the steps\r\nbelow using mdns-repeater and python zeroconf (via Home Assistant in my case).\r\n\r\nThe CCA crash manifests itself by the multicast messages announcing\r\nthe CCA and its audio groups stopping appearing.  E.g., if you do\r\n\r\ntcpdump -npi eno1 port 5353 and host [CCA_IP]\r\n\r\nyou'll see a couple of PTR responses coming from the devices every 10\r\nseconds, announcing something like:\r\n\r\nChromecast-Audio-dc.a.................f._googlecast._tcp.local: type TXT, class IN, cache flush\r\n\r\nwhen the set of steps below happens, these announcements end until either:\r\n\r\n1) the CCA reboots (power cycle); or\r\n\r\n2) the CCA is forced to switch to a new WAP; e.g., I have a script\r\nthat forces a client to reconnect to the WAP in order to kick this\r\nmDNS announcing process back on.\r\n\r\nWhen those announcements cease, the Google Home app on Android stops\r\nshowing \"Play Music\" links under that device in the display.  HOWEVER,\r\nthere is a per-physical-WAP (based off the MAC of the WAP, not SSID,\r\nso it is not shared across multiple mesh-networked WAPs on the same\r\nSSID) cache for Google Home, so you won't see the problem happen\r\nimmediately.  You instead, have to go to another room, ensure the phone\r\nis connected to a new WAP, and then see that \"Play Music\" will no\r\nlonger show up for that device.\r\n\r\nIt's worthing noting that the TCP socket interface to each ChromeCast Audio\r\ndevice is still working after the MDNS announcing process has died. E.g.,\r\nyou can still play music and control the device via TCP APIs, you just\r\ncan't discover the device via mDNS.\r\n\r\n\r\nBUG #1 SUMMARY - HIGH SEVERITY but probably NO FIX: Google ChromeCast\r\nAudio must not crash due to bad network data. (But this probably won't\r\nget fixed since Google Home/Mini do not have the bug and the CCA is a\r\ndiscontinued product.)\r\n\r\n\r\n\r\nBUG #2 PYTHON ZEROCONF SHOULD NOT SEND HUGE PACKETS\r\n\r\nI have 30+ ChromeCast Audio devices and over 80+ Google casting\r\ndevices.  A query response to _googlecast._tcp.locl. results in\r\na response that's almost 4KB, far larger than the 1500 MTU on\r\nmost ethernet switches.  E.g., if I modify examples/browser.py\r\nto interrogate like so:\r\n\r\n    browser = ServiceBrowser(zeroconf, \"_googlecast._tcp.local.\", handlers=[on_service_state_change])\r\n\r\nzeroconf will then publish those 4KB mDNS responses. They, of\r\ncourse, get IP fragmented and that seems to be find when multicasting\r\ndirectly to the CCAs and other devices.  However, RFC 6762\r\n(https://tools.ietf.org/html/rfc6762) section 17 states some\r\nrequirements for Multicast DNS Message Size, and the fourth paragraph reads:\r\n\r\n\"A Multicast DNS packet larger than the interface MTU, which is sent\r\n using fragments, MUST NOT contain more than one resource record.\"\r\n\r\nLarger than the interface MTU seems to me to mean that these Responses\r\nmust limit themselves to no more than 1500 octets (except in the\r\nspecial case of a long single record that's too big).  That's not the\r\nissue here -- the responses causing the crash are, e.g., 59 Resource\r\nRecords (RR) in the answer (not a single long one).\r\n\r\nFor whatever reason, that problem alone is not causing the ChromeCast\r\nAudios to crash, but I strongly suspect that fixing this problem would\r\nfix the stack.  I believe these MUST be broken up into separate UDP\r\npackets of length \u003c= 1500 (the interface MTU) at the application layer\r\n(rather than using IP fragmentation).\r\n\r\nYou can reproduce this using avahi-publish to create lots of records in a\r\nsubdomain and then browsing that subdomain. The total length of the\r\nDNS records should exceed 2KB (for good measure to be sure it's\r\nbig enough).\r\n\r\nBUG #2 SUMMARY - MEDIUM SEVERITY AND STRAIGHTFORWARD FIX: python\r\nzeroconf MUST adhere to RFC 6762.\r\n\r\n\r\nBUG #3 MDNS-REPEATER SOMEHOW TICKLES BUG #1 WHEN PRESENTED WITH MDNS IP FRAGMENTS\r\n\r\nI've not investigated this thoroughly, but I suspect it's either due\r\nto some kind of UDP storm due to a cycle that crashes that CCAs\r\nbecause of the fragmentation, or some kind of packet rewriting.\r\n\r\nThe only other open issue on home-assistant/plugin-multicast seems\r\npossibly relevant\r\n(https://github.com/home-assistant/plugin-multicast/issues/1) and\r\njesserockz's note at the end is worth understanding/trying. I don't\r\nthink the mdns-repeater code should be mirroring all the interfaces,\r\nso if it is, that's a bug.\r\n\r\nNote that in the configuration where I can reproduce this,\r\nmdns-repeater is running inside Home Assistant's hass.io plugin called\r\nthe home-assistant/plugin-multicast\r\n\r\nI work around it by running a shell inside that docker environment and\r\nchanging the run command to comment out the running of mdns-repeater\r\n(since just docker stop-ping that container results in the hassio\r\nsupervisor restarting the container).\r\n\r\nIt may be worth noting that the machine on which hassio has many network interfaces:\r\n```\r\n$ ifconfig # output follows\r\ndocker0: flags=4163\u003cUP,BROADCAST,RUNNING,MULTICAST>  mtu 1500\r\neno1: flags=4163\u003cUP,BROADCAST,RUNNING,MULTICAST>  mtu 1500\r\neno2: flags=4099\u003cUP,BROADCAST,MULTICAST>  mtu 1500\r\nenp2s0f0: flags=4099\u003cUP,BROADCAST,MULTICAST>  mtu 1500\r\nenp2s0f1: flags=4099\u003cUP,BROADCAST,MULTICAST>  mtu 1500\r\nhassio: flags=4163\u003cUP,BROADCAST,RUNNING,MULTICAST>  mtu 1500\r\nlo: flags=73\u003cUP,LOOPBACK,RUNNING>  mtu 65536\r\nveth0ac5dfe: flags=4163\u003cUP,BROADCAST,RUNNING,MULTICAST>  mtu 1500\r\nveth0ff2059: flags=4163\u003cUP,BROADCAST,RUNNING,MULTICAST>  mtu 1500\r\nveth1b05ec4: flags=4163\u003cUP,BROADCAST,RUNNING,MULTICAST>  mtu 1500\r\nveth3003e6f: flags=4163\u003cUP,BROADCAST,RUNNING,MULTICAST>  mtu 1500\r\nveth347b241: flags=4163\u003cUP,BROADCAST,RUNNING,MULTICAST>  mtu 1500\r\nveth54a968f: flags=4163\u003cUP,BROADCAST,RUNNING,MULTICAST>  mtu 1500\r\nveth748acbe: flags=4163\u003cUP,BROADCAST,RUNNING,MULTICAST>  mtu 1500\r\nvethc5fab43: flags=4163\u003cUP,BROADCAST,RUNNING,MULTICAST>  mtu 1500\r\nvethedd7c47: flags=4163\u003cUP,BROADCAST,RUNNING,MULTICAST>  mtu 1500\r\nvirbr0: flags=4099\u003cUP,BROADCAST,MULTICAST>  mtu 1500\r\n```\r\n\r\nBUG #3 SUMMARY - UNCERTAIN SEVERITY AND FIX. Confirm it's behaving\r\nas expected when there are multiple interfaces and in the presence\r\nof UDP packets undergoing IP fragmentation.\r\n\r\n\r\nSummary: I propose fixing python-zeroconf as the quickest and easiest\r\nchange, and ideally someone more in tune with what homeassistant is\r\ntrying to do with mdns-repeater could figure out the right fix to\r\nmdns-repeater and/or the way the multicast plugin is configured.\r\n\r\nLet me know what more information you need.\r\n","author":{"url":"https://github.com/gjbadros","@type":"Person","name":"gjbadros"},"datePublished":"2020-05-05T06:48:30Z","url":"https://github.com/python-zeroconf/python-zeroconf/issues/245"}

react-profiling0
react-import-mapreact,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-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:fedeafa6-db51-3296-b7af-4b366b058edf
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idB3B0:208599:412BFA:575A37:6B00A2C6
html-safe-noncee1743a0c465a4a7c3f924e141153ff0b52c655e707bc2e5f4e3c83b37c946632
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCM0IwOjIwODU5OTo0MTJCRkE6NTc1QTM3OjZCMDBBMkM2IiwidmlzaXRvcl9pZCI6Ijg2MjAyMzY4MjUwMTkwNjUwMzAiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac865306881f6d4348bc8a40ceea38c7603c1136a5c4e722a376405712a8802439
hovercard-subject-tagissue:612377030
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/python-zeroconf/python-zeroconf/245/issue_layout
twitter:imagehttps://opengraph.githubassets.com/2befd413d78bc0993b6e55dd8a6d485ef844ca6aab519a78ede9af9c679f3133/python-zeroconf/python-zeroconf/issues/245
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/2befd413d78bc0993b6e55dd8a6d485ef844ca6aab519a78ede9af9c679f3133/python-zeroconf/python-zeroconf/issues/245
og:image:altBecause I'm not sure of the right set of fixes, I'm filing this issue with each of: Google Chromecast/Home Team (via email), https://github.com/jstasiak/python-zeroconf, https://github.com/kennylev...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamegjbadros
hostnamegithub.com
expected-hostnamegithub.com
None455b493e3402a3a3a06beac5d20bb7db3da060808b220aa48d6a7eca7c59863a
turbo-cache-controlno-preview
go-importgithub.com/python-zeroconf/python-zeroconf git https://github.com/python-zeroconf/python-zeroconf.git
octolytics-dimension-user_id120192235
octolytics-dimension-user_loginpython-zeroconf
octolytics-dimension-repository_id21548731
octolytics-dimension-repository_nwopython-zeroconf/python-zeroconf
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id21548731
octolytics-dimension-repository_network_root_nwopython-zeroconf/python-zeroconf
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release2f575159976167242d488c0b062eb355c4e198b7
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/python-zeroconf/python-zeroconf/issues/245#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython-zeroconf%2Fpython-zeroconf%2Fissues%2F245
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython-zeroconf%2Fpython-zeroconf%2Fissues%2F245
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=python-zeroconf%2Fpython-zeroconf
Reloadhttps://github.com/python-zeroconf/python-zeroconf/issues/245
Reloadhttps://github.com/python-zeroconf/python-zeroconf/issues/245
Reloadhttps://github.com/python-zeroconf/python-zeroconf/issues/245
python-zeroconfhttps://github.com/python-zeroconf
python-zeroconfhttps://github.com/python-zeroconf/python-zeroconf
Codehttps://github.com/python-zeroconf/python-zeroconf
Issues50 (50)https://github.com/python-zeroconf/python-zeroconf/issues
Pull requests16 (16)https://github.com/python-zeroconf/python-zeroconf/pulls
Discussionshttps://github.com/python-zeroconf/python-zeroconf/discussions
Actionshttps://github.com/python-zeroconf/python-zeroconf/actions
Projectshttps://github.com/python-zeroconf/python-zeroconf/projects
Wikihttps://github.com/python-zeroconf/python-zeroconf/wiki
Security and quality5 (5)https://github.com/python-zeroconf/python-zeroconf/security
Insightshttps://github.com/python-zeroconf/python-zeroconf/insights
https://github.com/python-zeroconf/python-zeroconf
New issuehttps://github.com/login?return_to=https://github.com/python-zeroconf/python-zeroconf/issues/245
New issuehttps://github.com/login?return_to=https://github.com/python-zeroconf/python-zeroconf/issues/245
mdns-repeater causes ChromeCast Audio devices to cease broadcasting mDNS responses when interface MTU exceededhttps://github.com/python-zeroconf/python-zeroconf/issues/245#top
https://github.com/gjbadros
gjbadroshttps://github.com/gjbadros
on May 5, 2020https://github.com/python-zeroconf/python-zeroconf/issues/245#issue-612377030
https://github.com/jstasiak/python-zeroconfhttps://github.com/jstasiak/python-zeroconf
https://github.com/kennylevinsen/mdns-repeaterhttps://github.com/kennylevinsen/mdns-repeater
https://github.com/home-assistant/plugin-multicasthttps://github.com/home-assistant/plugin-multicast
https://github.com/home-assistant/corehttps://github.com/home-assistant/core
https://github.com/home-assistant/plugin-multicasthttps://github.com/home-assistant/plugin-multicast
#1https://github.com/python-zeroconf/python-zeroconf/issues/1
#1https://github.com/python-zeroconf/python-zeroconf/issues/1
#2https://github.com/python-zeroconf/python-zeroconf/issues/2
https://tools.ietf.org/html/rfc6762https://tools.ietf.org/html/rfc6762
#2https://github.com/python-zeroconf/python-zeroconf/issues/2
#3https://github.com/python-zeroconf/python-zeroconf/issues/3
#1https://github.com/python-zeroconf/python-zeroconf/issues/1
home-assistant/plugin-multicast#1https://github.com/home-assistant/plugin-multicast/issues/1
#3https://github.com/python-zeroconf/python-zeroconf/issues/3
https://github.com/gjbadros
gjbadroshttps://github.com/gjbadros
on May 9, 2020https://github.com/python-zeroconf/python-zeroconf/issues/245#issuecomment-626089134
gjbadros@e3268d2https://github.com/gjbadros/python-zeroconf/commit/e3268d212ab1897c685d3eb44efa26b7ec0976d9
jstasiakhttps://github.com/jstasiak
on May 26, 2020https://github.com/python-zeroconf/python-zeroconf/issues/245#event-3375421932
Separately send large mDNS responses to comply with RFC 6762 (#248)https://github.com/python-zeroconf/python-zeroconf/commit/87a0fe27a7be9d96af08f8a007f37a16105c64a0
#248https://github.com/python-zeroconf/python-zeroconf/pull/248
87a0fe2https://github.com/python-zeroconf/python-zeroconf/commit/87a0fe27a7be9d96af08f8a007f37a16105c64a0
https://github.com/jstasiak
jstasiakhttps://github.com/jstasiak
on May 27, 2020https://github.com/python-zeroconf/python-zeroconf/issues/245#issuecomment-634910496
#248https://github.com/python-zeroconf/python-zeroconf/pull/248
jstasiakhttps://github.com/jstasiak
completedhttps://github.com/python-zeroconf/python-zeroconf/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
on May 27, 2020https://github.com/python-zeroconf/python-zeroconf/issues/245#event-3379871494
https://github.com/gjbadros
gjbadroshttps://github.com/gjbadros
on May 27, 2020https://github.com/python-zeroconf/python-zeroconf/issues/245#issuecomment-634925746
…https://github.com/python-zeroconf/python-zeroconf/issues/245
#248https://github.com/python-zeroconf/python-zeroconf/pull/248
#248https://github.com/python-zeroconf/python-zeroconf/pull/248
#245 (comment)https://github.com/python-zeroconf/python-zeroconf/issues/245#issuecomment-634910496
https://github.com/notifications/unsubscribe-auth/AALOHTN5D3PMZPND5P2TQUDRTVW5JANCNFSM4MZKEYFQhttps://github.com/notifications/unsubscribe-auth/AALOHTN5D3PMZPND5P2TQUDRTVW5JANCNFSM4MZKEYFQ
Sign up for freehttps://github.com/signup?return_to=https://github.com/python-zeroconf/python-zeroconf/issues/245
Sign in to commenthttps://github.com/login?return_to=https://github.com/python-zeroconf/python-zeroconf/issues/245
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.