X-Git-Url: https://www.tinc-vpn.org/git/browse?a=blobdiff_plain;f=gui%2Ftinc-gui;h=f1a9bbfcaabd1a9a2d0ce512addac0603b166bb5;hb=06a4a8c153407b690a3ce3f0e7fdaa8568ccb1a3;hp=24ca96e8f99dbceb011ac53628b042f91bc33842;hpb=c10f3105b354c523d4d4d36b09dd46f890e94a30;p=tinc diff --git a/gui/tinc-gui b/gui/tinc-gui index 24ca96e8..f1a9bbfc 100755 --- a/gui/tinc-gui +++ b/gui/tinc-gui @@ -1,7 +1,8 @@ #!/usr/bin/python # tinc-gui -- GUI for controlling a running tincd -# Copyright (C) 2009-2012 Guus Sliepen +# Copyright (C) 2009-2014 Guus Sliepen +# 2014 Dennis Joachimsthaler # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -130,7 +131,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()