summaryrefslogtreecommitdiff
path: root/node/NetworkConfig.hpp
diff options
context:
space:
mode:
authorJoseph Henry <josephjah@gmail.com>2019-07-23 12:39:07 -0700
committerJoseph Henry <josephjah@gmail.com>2019-07-23 12:39:07 -0700
commit6958ba9557f4c9969f0decd1e70c7dafb7ca6209 (patch)
tree8f6836de215786294bd30d022194e1b8f426790c /node/NetworkConfig.hpp
parent5f11daadf20cc92dc451d0fdd41dd930b2524e8a (diff)
downloadinfinitytier-6958ba9557f4c9969f0decd1e70c7dafb7ca6209.tar.gz
infinitytier-6958ba9557f4c9969f0decd1e70c7dafb7ca6209.zip
Added ZT_DISABLE_COMPRESSION build flag for SDK and low-end NAS builds
Diffstat (limited to 'node/NetworkConfig.hpp')
-rw-r--r--node/NetworkConfig.hpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/node/NetworkConfig.hpp b/node/NetworkConfig.hpp
index be8c03dd..ddad52a5 100644
--- a/node/NetworkConfig.hpp
+++ b/node/NetworkConfig.hpp
@@ -276,10 +276,14 @@ public:
*/
inline bool disableCompression() const
{
-#ifndef ZT_SDK
+#ifndef ZT_DISABLE_COMPRESSION
return ((this->flags & ZT_NETWORKCONFIG_FLAG_DISABLE_COMPRESSION) != 0);
#else
- return false; // Compression is disabled for SDK builds since it doesn't play nice with lwIP
+ /* Compression is disabled for libzt builds since it causes non-obvious chaotic
+ interference with lwIP's TCP congestion algorithm. Compression is also disabled
+ for some NAS builds due to the usage of low-performance processors in certain
+ older and budget models. */
+ return false;
#endif
}