test adding BindToDevice to linux. if it works then we'll want to rethink slightly how we get the tcpContext on every platform, to make this compile everywhere and look a little cleaner

This commit is contained in:
Arceliar 2019-10-25 18:33:23 -05:00
parent 1fbab17b37
commit bcacfb0638
2 changed files with 15 additions and 0 deletions

View file

@ -299,6 +299,7 @@ func (t *tcp) call(saddr string, options interface{}, sintf string, upgrade *Tcp
Timeout: time.Second * 5,
}
if sintf != "" {
dialer.Control = t.getContextWithBindToDevice(sintf)
ief, err := net.InterfaceByName(sintf)
if err != nil {
return