vendor: Revert to github.com/jackpal/gateway instead of fork
It now includes all the fixes GitHub-Pull-Request: https://github.com/syncthing/syncthing/pull/3246
This commit is contained in:
committed by
Audrius Butkevicius
parent
8709fec517
commit
6a67921e40
16
vendor/github.com/jackpal/gateway/gateway_freebsd.go
generated
vendored
Normal file
16
vendor/github.com/jackpal/gateway/gateway_freebsd.go
generated
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
package gateway
|
||||
|
||||
import (
|
||||
"net"
|
||||
"os/exec"
|
||||
)
|
||||
|
||||
func DiscoverGateway() (ip net.IP, err error) {
|
||||
routeCmd := exec.Command("netstat", "-rn")
|
||||
output, err := routeCmd.CombinedOutput()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return parseBSDSolarisNetstat(output)
|
||||
}
|
||||
Reference in New Issue
Block a user