Open
Description
SO_BINDTOIFINDEX
has been added to linux since linux v5.1. It behaves similar to SO_BINDTODEVICE
but takes the interface index as argument. When a user-space program has the index of a network interface, Calling it directly avoids the possibility where the network device is renamed asynchronously after the program temporarily resolves the interface name from the interface index.
Socket::bind_device_by_index{v4,v6}
currently is limited to macOS-like systems and solaris/illumos only. (See also issue #560 )
While current implementation is not valid to linux, another implementation can be defined for linux guarded by cfg
macro.
Android also has support for SO_BINDTODEVICE
, therefore the support can be extended to android target as well.
Metadata
Metadata
Assignees
Labels
No labels