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

FreeBSD minimal-ws-server only listens on ipv6. #1947

Closed
jsm222 opened this issue Jun 10, 2020 · 3 comments
Closed

FreeBSD minimal-ws-server only listens on ipv6. #1947

jsm222 opened this issue Jun 10, 2020 · 3 comments

Comments

@jsm222
Copy link

jsm222 commented Jun 10, 2020

This is version 4.0.15. after building and building libwebsockets-4.0.15/minimal-examples/ws-server/minimal-ws-server the server only uses ipv6 even though ipv4 is enabled. I found this issue working on a port of https://github.com/meetecho/janus-gateway/
The only way on FreeBSD to use ipv4 is to disable the IPV6 build option..
Do you have any hints on why this happens?

@lws-team
Copy link
Member

Thanks for relating it to a minimal example.

the server only uses ipv6 even though ipv4 is enabled

You should be able to control it per-vhost by setting LWS_SERVER_OPTION_DISABLE_IPV6 in the info.options at vhost creation time

https://libwebsockets.org/git/libwebsockets/tree/include/libwebsockets/lws-context-vhost.h#n63

@jsm222
Copy link
Author

jsm222 commented Jun 11, 2020

Thank you :-) That works, I'll add a patch to my janus-gateway port that inserts that if the ip is ipv4 format.

@lws-team
Copy link
Member

Great.

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