Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to connect to main repeater over IPv6 #139

Open
dcode opened this issue Mar 8, 2023 · 3 comments
Open

Unable to connect to main repeater over IPv6 #139

dcode opened this issue Mar 8, 2023 · 3 comments

Comments

@dcode
Copy link

dcode commented Mar 8, 2023

My RadioRA3 main repeater sits on a dual-stack IPv4/IPv6 subnet. The mDNS advertisement for _lutron._tcp is published on both IPv6 and IPv4, where IPv6 seems to take priority. I can manually add the integration for the IPv4 address that I know, but it's maybe not so straightforward for all users and there may be cases where a user doesn't have IPv4. In either case, it's an unnecessary limitation.

I think the only issue is the hard-coded family specification of socket.AF_INET. I recommend using socket.getaddrinfo(), which will yield potentially resolutions for both IPv4 and IPv6, but you get the family constant in the response.

@mdonoughe
Copy link
Collaborator

Are you using Home Assistant? I have dual-stack and I have not had any problems like this.

@mdonoughe
Copy link
Collaborator

This might fix it, but it may be a problem with your configuration: mdonoughe@7ec0b3d

If you're using the hostname and have a working mDNS name resolver, this should work, even if your bridge does not support IPv6. If you're using some software that detects the device and then tries to connect by IPv6 address, that will probably not work:

  1. With Caséta, even if you have routable IPv6 addresses on your network, the bridge selects a link-local IPv6 address. The address returned from mDNS service discovery must have a link name/number appended to it to be usable.
  2. With Caséta, the bridge configures IPv6 and advertises its IPv6 address via mDNS but does not accept connections over IPv6.

However, I think the old code should have also worked if your mDNS resolver is working correctly. It should connect to the IPv4 address associated with the provided name.

@dcode
Copy link
Author

dcode commented Mar 11, 2023 via email

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

No branches or pull requests

2 participants