mirror of
https://github.com/XTLS/Xray-core.git
synced 2026-10-17 13:04:05 +00:00
Sockopt: Cancel dialing after failed to bind interface, external controllers included such as TUN inbound's (#7173)
https://github.com/XTLS/Xray-core/pull/7161#issuecomment-6185101741 Fixes https://github.com/XTLS/Xray-core/issues/7160#issuecomment-6200788453 --------- Co-authored-by: Gleb <a1212gleb@gmail.com>
This commit is contained in:
@@ -22,7 +22,7 @@ func applyOutboundSocketOptions(network string, address string, fd uintptr, conf
|
||||
|
||||
if config.Interface != "" {
|
||||
if err := syscall.BindToDevice(int(fd), config.Interface); err != nil {
|
||||
return errors.New("failed to set Interface").Base(err)
|
||||
return NewBindError(errors.New("failed to set Interface").Base(err))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user