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

bind to interface using SO_BINDTODEVICE socket option on Linux platforms #3124

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

siliconja
Copy link

Use the SO_BINDTODEVICE socket option on Linux platforms when binding lws sockets. Current behavior binds to an address on the interface when the interface is specified in lws_socket_bind(). This forces traffic over a certain interface, which can be useful for multi-homed systems.

This provides similar behavior to libcurl and c-ares libs. On Linux this requires elevated privileges, and failure to bind is non-fatal.

@lws-team lws-team force-pushed the main branch 3 times, most recently from 026710d to 9ba1504 Compare May 7, 2024 12:49
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.

None yet

2 participants