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

Implement IPv6 to IPv4 fallback #1208

Closed
derselbst opened this issue Jan 31, 2023 · 3 comments · Fixed by #1265
Closed

Implement IPv6 to IPv4 fallback #1208

derselbst opened this issue Jan 31, 2023 · 3 comments · Fixed by #1265

Comments

@derselbst
Copy link
Member

Related discussion

#1205

Is your feature request related to a problem?

The enable-ipv6 cmake option disables IPv4 support, causing fluidsynth's server to fail starting on system which have disabled IPv6 runtime support

Describe the solution you'd like

Ideally, get rid of the enable-ipv6 option altogether. This can be done by

  • either always trying to open IPv4 and IPv6 sockets, or
  • first trying IPv6 and if it fails with EAFNOSUPPORT use an IPv4 socket.

Describe alternatives you've considered

none

Additional context

Low priority issue, contribution required.

@ivan-zaera
Copy link
Contributor

I'm doing this 🖐️. I just need to source format the changes and send the PR.

It's working locally now (tested by starting the server from the command line and connecting from midieditor to the daemon).

I've implemented it like this:

first trying IPv6 and if it fails with EAFNOSUPPORT use an IPv4 socket.

However, I'm still allowing the enable-ipv6 option because, since it is on by default, leaving it could make sense for people willing to compile the tool with strict IPv4 support.

But if you think it's better to remove it I can try to do it.

@derselbst
Copy link
Member Author

Merged and will be part of 2.3.4 - @3hhh FYI.

I'm still allowing the enable-ipv6 option because

Agreed. Thanks again!

@3hhh
Copy link

3hhh commented Aug 5, 2023

Nice! Thanks to @ivan-zaera!

DominusExult added a commit to DominusExult/fluidsynth-sans-glib that referenced this issue Mar 6, 2024
* commit '683270db64302e59d26b9610514af1cfe0a80493':
  Bump to 2.3.5
  Fix libinstpatch and sndfile not being discovered on Windows (FluidSynth#1299)
  Update FreeBSD CI: Drop 12.4 and add 14.0
  Fix some rounding issues due to double promotion (FluidSynth#1286)
  Bump to 2.3.4
  Fix player termination after stopping and restarting (FluidSynth#1273)
  fix for issue FluidSynth#1268: Pipewire's Jack implementation not found (FluidSynth#1269)
  Fix issue with CMake Xcode generator (FluidSynth#1266)
  Refurbish CI (FluidSynth#1267)
  Fallback to IPv4 when creating socket if IPv6 is not available (FluidSynth#1208) (FluidSynth#1265)
  Turn off pending notes and issue a warning (FluidSynth#1264)
  Fix incorrect way of turning CMAKE_INSTALL_LIBDIR absolute (FluidSynth#1261)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants