mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2024-12-19 04:57:53 +00:00
Another fix for ye old tyme clients.
This commit is contained in:
parent
b1fb020aea
commit
2d858b05ac
@ -92,6 +92,15 @@ extern "C" {
|
|||||||
*/
|
*/
|
||||||
#define ZT_MAX_MTU 10000
|
#define ZT_MAX_MTU 10000
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Default payload MTU for UDP packets
|
||||||
|
*
|
||||||
|
* This is 1500 - IPv6 UDP overhead - PPPoE overhead and is safe for 99.9% of
|
||||||
|
* all Internet links.
|
||||||
|
*/
|
||||||
|
#define ZT_DEFAULT_PHYSMTU 1444
|
||||||
|
#define ZT_UDP_DEFAULT_PAYLOAD_MTU 1444
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Maximum physical UDP payload
|
* Maximum physical UDP payload
|
||||||
*/
|
*/
|
||||||
@ -103,7 +112,7 @@ extern "C" {
|
|||||||
#define ZT_MAX_HEADROOM 224
|
#define ZT_MAX_HEADROOM 224
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Maximum physical MTU
|
* Maximum payload MTU for UDP packets
|
||||||
*/
|
*/
|
||||||
#define ZT_MAX_PHYSMTU (ZT_MAX_PHYSPAYLOAD + ZT_MAX_HEADROOM)
|
#define ZT_MAX_PHYSMTU (ZT_MAX_PHYSPAYLOAD + ZT_MAX_HEADROOM)
|
||||||
|
|
||||||
|
@ -171,15 +171,6 @@
|
|||||||
*/
|
*/
|
||||||
#define ZT_ADDRESS_RESERVED_PREFIX 0xff
|
#define ZT_ADDRESS_RESERVED_PREFIX 0xff
|
||||||
|
|
||||||
/**
|
|
||||||
* Default payload MTU for UDP packets
|
|
||||||
*
|
|
||||||
* In the future we might support UDP path MTU discovery, but for now we
|
|
||||||
* set a maximum that is equal to 1500 minus 8 (for PPPoE overhead, common
|
|
||||||
* in some markets) minus 48 (IPv6 UDP overhead).
|
|
||||||
*/
|
|
||||||
#define ZT_UDP_DEFAULT_PAYLOAD_MTU 1444
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Default MTU used for Ethernet tap device
|
* Default MTU used for Ethernet tap device
|
||||||
*/
|
*/
|
||||||
|
@ -35,6 +35,7 @@ namespace ZeroTier {
|
|||||||
bool NetworkConfig::toDictionary(Dictionary<ZT_NETWORKCONFIG_DICT_CAPACITY> &d,bool includeLegacy) const
|
bool NetworkConfig::toDictionary(Dictionary<ZT_NETWORKCONFIG_DICT_CAPACITY> &d,bool includeLegacy) const
|
||||||
{
|
{
|
||||||
Buffer<ZT_NETWORKCONFIG_DICT_CAPACITY> *tmp = new Buffer<ZT_NETWORKCONFIG_DICT_CAPACITY>();
|
Buffer<ZT_NETWORKCONFIG_DICT_CAPACITY> *tmp = new Buffer<ZT_NETWORKCONFIG_DICT_CAPACITY>();
|
||||||
|
char tmp2[128];
|
||||||
|
|
||||||
try {
|
try {
|
||||||
d.clear();
|
d.clear();
|
||||||
@ -46,8 +47,8 @@ bool NetworkConfig::toDictionary(Dictionary<ZT_NETWORKCONFIG_DICT_CAPACITY> &d,b
|
|||||||
if (!d.add(ZT_NETWORKCONFIG_DICT_KEY_TIMESTAMP,this->timestamp)) return false;
|
if (!d.add(ZT_NETWORKCONFIG_DICT_KEY_TIMESTAMP,this->timestamp)) return false;
|
||||||
if (!d.add(ZT_NETWORKCONFIG_DICT_KEY_CREDENTIAL_TIME_MAX_DELTA,this->credentialTimeMaxDelta)) return false;
|
if (!d.add(ZT_NETWORKCONFIG_DICT_KEY_CREDENTIAL_TIME_MAX_DELTA,this->credentialTimeMaxDelta)) return false;
|
||||||
if (!d.add(ZT_NETWORKCONFIG_DICT_KEY_REVISION,this->revision)) return false;
|
if (!d.add(ZT_NETWORKCONFIG_DICT_KEY_REVISION,this->revision)) return false;
|
||||||
if (!d.add(ZT_NETWORKCONFIG_DICT_KEY_ISSUED_TO,this->issuedTo)) return false;
|
if (!d.add(ZT_NETWORKCONFIG_DICT_KEY_ISSUED_TO,this->issuedTo.toString(tmp2))) return false;
|
||||||
if (!d.add(ZT_NETWORKCONFIG_DICT_KEY_REMOTE_TRACE_TARGET,this->remoteTraceTarget)) return false;
|
if (!d.add(ZT_NETWORKCONFIG_DICT_KEY_REMOTE_TRACE_TARGET,this->remoteTraceTarget.toString(tmp2))) return false;
|
||||||
if (!d.add(ZT_NETWORKCONFIG_DICT_KEY_FLAGS,this->flags)) return false;
|
if (!d.add(ZT_NETWORKCONFIG_DICT_KEY_FLAGS,this->flags)) return false;
|
||||||
if (!d.add(ZT_NETWORKCONFIG_DICT_KEY_MULTICAST_LIMIT,(uint64_t)this->multicastLimit)) return false;
|
if (!d.add(ZT_NETWORKCONFIG_DICT_KEY_MULTICAST_LIMIT,(uint64_t)this->multicastLimit)) return false;
|
||||||
if (!d.add(ZT_NETWORKCONFIG_DICT_KEY_TYPE,(uint64_t)this->type)) return false;
|
if (!d.add(ZT_NETWORKCONFIG_DICT_KEY_TYPE,(uint64_t)this->type)) return false;
|
||||||
|
Loading…
Reference in New Issue
Block a user