From 88ba0c1154d8d2fb6e2df57a18956be7311ab2bb Mon Sep 17 00:00:00 2001 From: shortcutme Date: Sat, 26 Jan 2019 20:31:05 +0100 Subject: [PATCH] Don't detect cjdns ips as private ips --- src/util/helper.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/util/helper.py b/src/util/helper.py index 9653b132..22bbf66d 100644 --- a/src/util/helper.py +++ b/src/util/helper.py @@ -12,6 +12,7 @@ import gevent if "inet_pton" not in dir(socket): import win_inet_pton + from Config import config @@ -248,7 +249,7 @@ def isIp(ip): return False -local_ip_pattern = re.compile(r"^(127\.)|(192\.168\.)|(10\.)|(172\.1[6-9]\.)|(172\.2[0-9]\.)|(172\.3[0-1]\.)|(::1$)|([fF][cCdD])") +local_ip_pattern = re.compile(r"^(127\.)|(192\.168\.)|(10\.)|(172\.1[6-9]\.)|(172\.2[0-9]\.)|(172\.3[0-1]\.)|(::1$)|fe80") def isPrivateIp(ip): return local_ip_pattern.match(ip)