-
Notifications
You must be signed in to change notification settings - Fork 681
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
Add SO_BINDTODEVICE sockopt #1233
Conversation
Tested on |
All new features in Nix require a CHANGELOG and a test. Can you please add those? |
@asomers Yeah, I'll do it. |
c33cfbb
to
10ebf45
Compare
@asomers Changes addressed |
This is available only on Linux as far I know, [socket(7)](https://linux.die.net/man/7/socket) has some information about the `SO_BINDTODEVICE` sockopt. In simple words it binds a socket to an specific network device (specified as an string like "wlo1", "eth0", etc.), to only process packets from that device. Signed-off-by: Jean Pierre Dudey <[email protected]>
10ebf45
to
1686f6d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your contribution.
bors r+
Thanks for your review! |
Build succeeded: |
This is available only on Linux as far I know, socket(7) has some information
about the
SO_BINDTODEVICE
sockopt. In simple words it binds a socketto an specific network device (specified as an string like "wlo1",
"eth0", etc.), to only process packets from that device.
Note: this is untested (for now, i'll test it today), but should work out of the box.