Ver Fonte

Fix: compile error in 88aeed5

Rod Hynes há 7 anos atrás
pai
commit
39726b97da
2 ficheiros alterados com 4 adições e 4 exclusões
  1. 2 2
      psiphon/LookupIP.go
  2. 2 2
      psiphon/TCPConn_bind.go

+ 2 - 2
psiphon/LookupIP.go

@@ -44,7 +44,7 @@ func LookupIP(ctx context.Context, host string, config *DialConfig) ([]net.IP, e
 		return []net.IP{ip}, nil
 	}
 
-	if config.deviceBinder != nil {
+	if config.DeviceBinder != nil {
 
 		dnsServer := config.DnsServerGetter.GetPrimaryDnsServer()
 
@@ -124,7 +124,7 @@ func bindLookupIP(
 		return nil, common.ContextError(err)
 	}
 
-	_, err = config.deviceBinder.BindToDevice(socketFd)
+	_, err = config.DeviceBinder.BindToDevice(socketFd)
 	if err != nil {
 		syscall.Close(socketFd)
 		return nil, common.ContextError(fmt.Errorf("BindToDevice failed: %s", err))

+ 2 - 2
psiphon/TCPConn_bind.go

@@ -136,8 +136,8 @@ func tcpDial(ctx context.Context, addr string, config *DialConfig) (net.Conn, er
 
 		tcpDialSetAdditionalSocketOptions(socketFD)
 
-		if config.deviceBinder != nil {
-			_, err = config.deviceBinder.BindToDevice(socketFD)
+		if config.DeviceBinder != nil {
+			_, err = config.DeviceBinder.BindToDevice(socketFD)
 			if err != nil {
 				syscall.Close(socketFD)
 				lastErr = common.ContextError(fmt.Errorf("BindToDevice failed: %s", err))