mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2025-06-05 17:01:54 +00:00
Fix for netconf advertising of multicast propagation parameters, and defaults in Network.hpp.
This commit is contained in:
parent
795f41c331
commit
c26b64f24b
@ -298,9 +298,9 @@ int main(int argc,char **argv)
|
|||||||
netconf["ts"] = buf;
|
netconf["ts"] = buf;
|
||||||
netconf["peer"] = peerIdentity.address().toString();
|
netconf["peer"] = peerIdentity.address().toString();
|
||||||
sprintf(buf,"%x",mcb);
|
sprintf(buf,"%x",mcb);
|
||||||
netconf["mcb"] = mcb;
|
netconf["mcb"] = buf;
|
||||||
sprintf(buf,"%x",mcd);
|
sprintf(buf,"%x",mcd);
|
||||||
netconf["mcd"] = mcd;
|
netconf["mcd"] = buf;
|
||||||
|
|
||||||
if (!isOpen) {
|
if (!isOpen) {
|
||||||
// TODO: handle closed networks, look up private membership,
|
// TODO: handle closed networks, look up private membership,
|
||||||
|
@ -325,7 +325,10 @@ public:
|
|||||||
const_iterator mcb(find("mcb"));
|
const_iterator mcb(find("mcb"));
|
||||||
if (mcb == end())
|
if (mcb == end())
|
||||||
return ZT_MULTICAST_DEFAULT_PROPAGATION_BREADTH;
|
return ZT_MULTICAST_DEFAULT_PROPAGATION_BREADTH;
|
||||||
return Utils::hexStrToUInt(mcb->second.c_str());
|
unsigned int mcb2 = Utils::hexStrToUInt(mcb->second.c_str());
|
||||||
|
if (mcb2)
|
||||||
|
return mcb2;
|
||||||
|
return ZT_MULTICAST_DEFAULT_PROPAGATION_BREADTH;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -336,7 +339,10 @@ public:
|
|||||||
const_iterator mcd(find("mcd"));
|
const_iterator mcd(find("mcd"));
|
||||||
if (mcd == end())
|
if (mcd == end())
|
||||||
return ZT_MULTICAST_DEFAULT_PROPAGATION_DEPTH;
|
return ZT_MULTICAST_DEFAULT_PROPAGATION_DEPTH;
|
||||||
return Utils::hexStrToUInt(mcd->second.c_str());
|
unsigned int mcd2 = Utils::hexStrToUInt(mcd->second.c_str());
|
||||||
|
if (mcd2)
|
||||||
|
return mcd2;
|
||||||
|
return ZT_MULTICAST_DEFAULT_PROPAGATION_DEPTH;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user