diff --git a/osdep/Phy.hpp b/osdep/Phy.hpp index 4a71629cc..58c403ac2 100644 --- a/osdep/Phy.hpp +++ b/osdep/Phy.hpp @@ -50,7 +50,9 @@ #include #include +#ifndef ZT_NO_METRICS #include "../node/Metrics.hpp" +#endif #if defined(__linux__) || defined(linux) || defined(__LINUX__) || defined(__linux) #ifndef IPV6_DONTFRAG @@ -476,7 +478,9 @@ public: sizeof(struct sockaddr_in)) == (long)len); #endif if (sent) { +#ifndef ZT_NO_METRICS Metrics::udp_send += len; +#endif } return sent; diff --git a/tcp-proxy/tcp-proxy.cpp b/tcp-proxy/tcp-proxy.cpp index d57351987..a7d3309f5 100644 --- a/tcp-proxy/tcp-proxy.cpp +++ b/tcp-proxy/tcp-proxy.cpp @@ -41,6 +41,7 @@ #include #include +#define ZT_NO_METRICS 1 #include "../osdep/Phy.hpp" #define ZT_TCP_PROXY_CONNECTION_TIMEOUT_SECONDS 300