diff options
author | Karsten Loesing <karsten.loesing@gmx.net> | 2014-02-13 18:58:21 +0100 |
---|---|---|
committer | Karsten Loesing <karsten.loesing@gmx.net> | 2014-02-13 18:58:21 +0100 |
commit | 436f7106b445b24f4f9aa4dc68584129c4b375cc (patch) | |
tree | ea24b2f8aa2b344f0c2e8e310cae6807edb6542c /src/config | |
parent | 749ead79ad2edbfbdc4b200529fdf7aff17df5e1 (diff) | |
download | tor-436f7106b445b24f4f9aa4dc68584129c4b375cc.tar tor-436f7106b445b24f4f9aa4dc68584129c4b375cc.tar.gz |
Exclude Teredo IPv6 prefix from geoip6.
The latest GeoLite2 database includes a pointer from 2001::/32 to the root
node of the IPv4 address space in the tree. We need to exclude this whole
address space from geoip6, similar to how we exclude IPv4-mapped IPv6
addresses and the 6to4 mapping subnet.
Diffstat (limited to 'src/config')
-rw-r--r-- | src/config/mmdb-convert.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/config/mmdb-convert.py b/src/config/mmdb-convert.py index 21a82bab5..80fe6a0e1 100644 --- a/src/config/mmdb-convert.py +++ b/src/config/mmdb-convert.py @@ -380,6 +380,7 @@ def fmt_item_ipv6(entry): IPV4_MAPPED_IPV6_PREFIX = "0"*80 + "1"*16 IPV6_6TO4_PREFIX = "0010000000000010" +TEREDO_IPV6_PREFIX = "0010000000000001" + "0"*16 def dump_item_ipv6(entries, prefix, val): """Dump the information for an IPv6 address prefix to entries, where @@ -391,7 +392,8 @@ def dump_item_ipv6(entries, prefix, val): """ if prefix.startswith(IPV4_PREFIX) or \ prefix.startswith(IPV4_MAPPED_IPV6_PREFIX) or \ - prefix.startswith(IPV6_6TO4_PREFIX): + prefix.startswith(IPV6_6TO4_PREFIX) or \ + prefix.startswith(TEREDO_IPV6_PREFIX): return v = int(prefix, 2) shift = 128 - len(prefix) |