From: Guus Sliepen Date: Sun, 19 Jan 2014 20:15:23 +0000 (+0100) Subject: Let tinc-gui use correct address family when connecting to tincd via TCP. X-Git-Tag: release-1.1pre10~15 X-Git-Url: https://tinc-vpn.org/git/browse?a=commitdiff_plain;h=a3decd09513370fbb3aa22dae11435103d179c30;p=tinc Let tinc-gui use correct address family when connecting to tincd via TCP. --- diff --git a/gui/tinc-gui b/gui/tinc-gui index 24ca96e8..75afd294 100755 --- a/gui/tinc-gui +++ b/gui/tinc-gui @@ -130,7 +130,11 @@ class VPN: else: # otherwise connect via TCP print(unixfile + " does not exist."); - s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) + if ':' in info[2]: + af = socket.AF_INET6 + else: + af = socket.AF_INET + s = socket.socket(af, socket.SOCK_STREAM) s.connect((info[2], int(info[4]))) self.sf = s.makefile()