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

listen to both IPV6 and IPV4 incoming connections: binding to "::" implies using both protocols #1290

Merged
merged 2 commits into from
Dec 21, 2024

Conversation

ernstkl
Copy link
Contributor

@ernstkl ernstkl commented Oct 9, 2024

Listen to both IPV4 and IPV6 incoming connections

Closes #1068

Why? Up to now the snapcast server only listens for IPV4 connections. This is a problem with clients that try a IPV6 connection first, and then do not quickly fall back to IPV4 (I think it was the Android snapclient app).

[x] This PR has been tested on Linux (Ubuntu).

Testing on Windows is not required - as per CMakeLists.txt the server is not built on Windows anyway.

A note on the code change: one could think of adding "::" to the list of addresses to listen to, like {{"0.0.0.0"}, {"::"}}
But that leads to a runtime error "address already in use", because the second list element, "::", implies binding to IPV4 as well, but that has already been done.
(You see the same when you configure both "0.0.0.0" and "::" as addresses in the config file, btw.)

@badaix badaix changed the base branch from develop to tls December 21, 2024 18:01
@badaix badaix merged commit 0e283f9 into badaix:tls Dec 21, 2024
32 checks passed
@badaix
Copy link
Owner

badaix commented Dec 21, 2024

Thanks

@ernstkl ernstkl deleted the feature/listen-to-both-ipv4-and-ipv6 branch December 21, 2024 20:47
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.

Change default bind_address of http/tcp/stream to include ipv6?
2 participants