summaryrefslogtreecommitdiff
path: root/node
diff options
context:
space:
mode:
authorAdam Ierymenko <adam.ierymenko@gmail.com>2016-02-10 11:06:26 -0800
committerAdam Ierymenko <adam.ierymenko@gmail.com>2016-02-10 11:06:26 -0800
commit82348e1537442f9f167e4365f3e3024cf70b2b8d (patch)
treeece1e798eea8f553ad00f516b6dac68f0765897b /node
parent10bb9919f15a7777905f3d43ca01325a229203c7 (diff)
downloadinfinitytier-82348e1537442f9f167e4365f3e3024cf70b2b8d.tar.gz
infinitytier-82348e1537442f9f167e4365f3e3024cf70b2b8d.zip
Temporarily blacklist he.net IPv6 tunnel addresses for paths: these usually have a very low MTU which causes packet loss and other issues.
Diffstat (limited to 'node')
-rw-r--r--node/Path.hpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/node/Path.hpp b/node/Path.hpp
index be64f334..cb7622d3 100644
--- a/node/Path.hpp
+++ b/node/Path.hpp
@@ -243,6 +243,14 @@ public:
case InetAddress::IP_SCOPE_PSEUDOPRIVATE:
case InetAddress::IP_SCOPE_SHARED:
case InetAddress::IP_SCOPE_GLOBAL:
+ if (a.ss_family == AF_INET6) {
+ // TEMPORARY HACK: for now, we are going to blacklist he.net IPv6
+ // tunnels due to very spotty performance and low MTU issues over
+ // these IPv6 tunnel links.
+ const uint8_t *ipd = reinterpret_cast<const uint8_t *>(reinterpret_cast<const struct sockaddr_in6 *>(&a)->sin6_addr.s6_addr);
+ if ((ipd[0] == 0x20)&&(ipd[1] == 0x01)&&(ipd[2] == 0x04)&&(ipd[3] == 0x70))
+ return false;
+ }
return true;
default:
return false;