diff options
| author | Adam Ierymenko <adam.ierymenko@gmail.com> | 2016-09-27 12:22:25 -0700 |
|---|---|---|
| committer | Adam Ierymenko <adam.ierymenko@gmail.com> | 2016-09-27 12:22:25 -0700 |
| commit | cc4bacc1995d5af6b8ab66973a6d22a229367eb4 (patch) | |
| tree | cb34960de2163c61ce17cc03f826d2d6f00e8fc7 /node/Switch.cpp | |
| parent | 15c07c58b610f699fd2a7164fde96712e1595f2b (diff) | |
| download | infinitytier-cc4bacc1995d5af6b8ab66973a6d22a229367eb4.tar.gz infinitytier-cc4bacc1995d5af6b8ab66973a6d22a229367eb4.zip | |
Cleanup, and implement compression disable flag for networks.
Diffstat (limited to 'node/Switch.cpp')
| -rw-r--r-- | node/Switch.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/node/Switch.cpp b/node/Switch.cpp index e3d57835..6611d6b6 100644 --- a/node/Switch.cpp +++ b/node/Switch.cpp @@ -476,6 +476,7 @@ void Switch::onLocalEthernet(const SharedPtr<Network> &network,const MAC &from,c network->config().multicastLimit, RR->node->now(), network->id(), + network->config().disableCompression(), network->config().activeBridges(), multicastGroup, (fromBridged) ? from : MAC(), @@ -501,14 +502,16 @@ void Switch::onLocalEthernet(const SharedPtr<Network> &network,const MAC &from,c from.appendTo(outp); outp.append((uint16_t)etherType); outp.append(data,len); - outp.compress(); + if (!network->config().disableCompression()) + outp.compress(); send(outp,true); } else { Packet outp(toZT,RR->identity.address(),Packet::VERB_FRAME); outp.append(network->id()); outp.append((uint16_t)etherType); outp.append(data,len); - outp.compress(); + if (!network->config().disableCompression()) + outp.compress(); send(outp,true); } @@ -565,7 +568,8 @@ void Switch::onLocalEthernet(const SharedPtr<Network> &network,const MAC &from,c from.appendTo(outp); outp.append((uint16_t)etherType); outp.append(data,len); - outp.compress(); + if (!network->config().disableCompression()) + outp.compress(); send(outp,true); } else { TRACE("%.16llx: %s -> %s %s packet not sent: filterOutgoingPacket() returned false",network->id(),from.toString().c_str(),to.toString().c_str(),etherTypeName(etherType)); |
