]> git.ipfire.org Git - people/teissler/ipfire-2.x.git/blobdiff - config/cfgroot/general-functions.pl
Consider 100.64.0.0/10 as private address space.
[people/teissler/ipfire-2.x.git] / config / cfgroot / general-functions.pl
index 9c6d460e66a5974d71882c9d147a3a5402fbe713..90eacbdb011487e2f4af8e60eb8cc42e249f3620 100644 (file)
@@ -858,7 +858,7 @@ sub FetchPublicIp {
         Net::SSLeay::set_proxy($peer,$peerport,$proxysettings{'UPSTREAM_USER'},$proxysettings{'UPSTREAM_PASSWORD'} );
     }
     my $user_agent = &MakeUserAgent();
-    my ($out, $response) = Net::SSLeay::get_http(  'checkip.dns.lightningwirelabs.com',
+    my ($out, $response) = Net::SSLeay::get_http(  'checkip4.dns.lightningwirelabs.com',
                                                    80,
                                                    "/",
                                                    Net::SSLeay::make_headers('User-Agent' => $user_agent )
@@ -920,9 +920,11 @@ sub GetDyndnsRedIP {
     close(IP);
     chomp $ip;
 
+    # 100.64.0.0/10 is reserved for dual-stack lite (http://tools.ietf.org/html/rfc6598).
     if (&General::IpInSubnet ($ip,'10.0.0.0','255.0.0.0') ||
         &General::IpInSubnet ($ip,'172.16.0.0.','255.240.0.0') ||
-        &General::IpInSubnet ($ip,'192.168.0.0','255.255.0.0'))
+        &General::IpInSubnet ($ip,'192.168.0.0','255.255.0.0') ||
+        &General::IpInSubnet ($ip,'100.64.0.0', '255.192.0.0'))
     {
        if ($settings{'BEHINDROUTER'} eq 'FETCH_IP') {
            my $RealIP = &General::FetchPublicIp;