Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@CloCkWeRX
Copy link
Contributor

@CloCkWeRX CloCkWeRX commented Mar 2, 2025

home-assistant/core#139617

  • Adds a net_addr dependency, I haven't looked into if its actually necessary or if its better to just do the try-catch parsing approach/make wrappers
  • Adjust discovery to work on IPv6, adding a simulated test case
  • Does not address other areas in the code
  • Swaps to inet_pton() in various places

Not tested with a real device.

I have a busy work week; so feel free to take over this PR/branch if there's other areas that should be addressed and you don't feel like waiting ~6-7 days.

Alternatively, could validate with valid_ipv4, valid_ipv6
@pwt
Copy link
Contributor

pwt commented Mar 2, 2025

Not seeing any files changed in this commit.

@pwt pwt self-assigned this Mar 2, 2025
@CloCkWeRX
Copy link
Contributor Author

Ugh, github UI :/ two secs

@pwt
Copy link
Contributor

pwt commented Mar 2, 2025

Has this been tested with any IPv6 Sonos systems? I'm wondering if the IPv4 assumption is widespread, beyond just the check. The discovery code, for example.

@PeteRager
Copy link
Contributor

Apparently this is happening during HA auto discovery. We need a look at the packets coming in as it's possible it's going to be auto discovered with a v4 and a v6 address. Another solution is to filter out v6 discovery packets.

@CloCkWeRX we should create a test case in HA that generates an auto discovery ipv6 address that would allow some level of trace through to happen without the device in hand. Likewise we'd need a similar test case here.

@CloCkWeRX CloCkWeRX marked this pull request as draft March 2, 2025 13:01
@CloCkWeRX CloCkWeRX changed the title Remove ipv4 validation; as sonos now supports IPv6 in some cases Adjust to allow both IPv4 and IPv6 addresses Mar 2, 2025
@CloCkWeRX
Copy link
Contributor Author

CloCkWeRX commented Mar 2, 2025

Has this been tested with any IPv6 Sonos systems?

No, I don't physically own one.

I'm wondering if the IPv4 assumption is widespread, beyond just the check.

So yes, I suspect that's likely. Unfortunately, I'm working off the backtrace in home-assistant/core#139617 rather than having a physical device so its harder to build up a reasonable set of realistic IPv6 test cases.

Did what I could by following the existing patterns.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants