diff --git a/component/dialer/bind_others.go b/component/dialer/bind_others.go index e9494673..a74995b5 100644 --- a/component/dialer/bind_others.go +++ b/component/dialer/bind_others.go @@ -58,7 +58,7 @@ func bindIfaceToDialer(ifaceName string, dialer *net.Dialer, network string, des return nil } - local := 0 + local := int64(0) if dialer.LocalAddr != nil { _, port, err := net.SplitHostPort(dialer.LocalAddr.String()) if err == nil { @@ -66,7 +66,7 @@ func bindIfaceToDialer(ifaceName string, dialer *net.Dialer, network string, des } } - addr, err := lookupLocalAddr(ifaceName, network, destination, local) + addr, err := lookupLocalAddr(ifaceName, network, destination, int(local)) if err != nil { return err } @@ -84,7 +84,7 @@ func bindIfaceToListenConfig(ifaceName string, _ *net.ListenConfig, network, add local, _ := strconv.ParseInt(port, 10, 16) - addr, err := lookupLocalAddr(ifaceName, network, nil, local) + addr, err := lookupLocalAddr(ifaceName, network, nil, int(local)) if err != nil { return "", err }