[tor-commits] [goptlib/master] Also need AuthCookie to do ExtOrPort.

dcf at torproject.org dcf at torproject.org
Wed Dec 11 07:45:46 UTC 2013


commit f27f30f16d6f8ac0b566a09c5c63c3f899569a14
Author: David Fifield <david at bamsoftware.com>
Date:   Tue Dec 10 23:32:20 2013 -0800

    Also need AuthCookie to do ExtOrPort.
---
 pt.go |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pt.go b/pt.go
index 9ac14e5..3478905 100644
--- a/pt.go
+++ b/pt.go
@@ -773,7 +773,7 @@ func extOrPortSetup(s io.ReadWriter, addr net.Addr, methodName string) error {
 // authentication à la 217-ext-orport-auth.txt is done before returning; an
 // error is returned if authentication fails.
 func DialOr(info *ServerInfo, addr net.Addr, methodName string) (net.Conn, error) {
-	if info.ExtendedOrAddr == nil {
+	if info.ExtendedOrAddr == nil || info.AuthCookie == nil {
 		return net.DialTCP("tcp", nil, info.OrAddr)
 	}
 





More information about the tor-commits mailing list