Fix the broken local IP regexes.
[quix0rs-apt-p2p.git] / apt_p2p_Khashmir / khashmir.py
index 408a7e974b0f32a900a4c255d38fa59411ed6cc5..9509ce6bbff17e3a15fa4b4a3200ce9eb8bc7b7c 100644 (file)
@@ -29,7 +29,9 @@ import krpc
 
 isLocal = re.compile('^(192\.168\.[0-9]{1,3}\.[0-9]{1,3})|'+
                      '(10\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3})|'+
-                     '(172\.0?([1][6-9])|([2][0-9])|([3][0-1])\.[0-9]{1,3}\.[0-9]{1,3})|'+
+                     '(172\.0?1[6-9]\.[0-9]{1,3}\.[0-9]{1,3})|'+
+                     '(172\.0?2[0-9]\.[0-9]{1,3}\.[0-9]{1,3})|'+
+                     '(172\.0?3[0-1]\.[0-9]{1,3}\.[0-9]{1,3})|'+
                      '(127\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3})$')
 
 class KhashmirBase(protocol.Factory):