Skip to content

Commit

Permalink
Fix bind forwarder to interface for systems stack
Browse files Browse the repository at this point in the history
  • Loading branch information
nekohasekai committed Dec 21, 2023
1 parent 5b50c61 commit ebb3908
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions stack_system.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,9 +111,9 @@ func (s *System) start() error {
var listener net.ListenConfig
if s.bindInterface {
listener.Control = control.Append(listener.Control, func(network, address string, conn syscall.RawConn) error {
err := control.BindToInterface(s.interfaceFinder, s.tunName, -1)(network, address, conn)
if err != nil {
s.logger.Warn("bind forwarder to interface: ", err)
bindErr := control.BindToInterface0(s.interfaceFinder, conn, network, address, s.tunName, -1, true)
if bindErr != nil {
s.logger.Warn("bind forwarder to interface: ", bindErr)
}
return nil
})
Expand Down

0 comments on commit ebb3908

Please sign in to comment.