updated on Thu Jan 26 16:09:46 UTC 2012
[aur-mirror.git] / wicd-ipv6 / support.ipv6.dns.patch
blobdd1776d2092bdfdf97525c770082550c779076da
1 --- wicd-1.7.0/wicd/misc.py 2010-12-12 03:54:41.000000000 +0800
2 +++ wicd-1.7.0.patched/wicd/misc.py 2011-01-11 16:39:53.000000000 +0800
3 @@ -151,7 +151,12 @@ def IsValidIP(ip):
4 if not number.isdigit() or int(number) > 255:
5 return False
6 return ipNumbers
7 - return False
8 + import socket
9 + try:
10 + socket.inet_pton(socket.AF_INET6, ip)
11 + except (TypeError, socket.error):
12 + return False
13 + return True
15 def PromptToStartDaemon():
16 """ Prompt the user to start the daemon """