mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2025-06-06 20:43:44 +02:00
Merge branch 'dev' into 1.12.1
This commit is contained in:
commit
1802a3fb51
2 changed files with 23 additions and 3 deletions
|
@ -120,7 +120,7 @@ Access control is via the ZeroTier control interface itself and `metricstoken.se
|
||||||
curl -H "X-ZT1-Auth: $(sudo cat /var/lib/zerotier-one/metricstoken.secret)" http://localhost:9993/metrics
|
curl -H "X-ZT1-Auth: $(sudo cat /var/lib/zerotier-one/metricstoken.secret)" http://localhost:9993/metrics
|
||||||
|
|
||||||
// macOS
|
// macOS
|
||||||
curl -H "X-XT1-Auth: $(sudo cat /Library/Application\ Support/ZeroTier/One/metricstoken.secret)" http://localhost:9993/metrics
|
curl -H "X-ZT1-Auth: $(sudo cat /Library/Application\ Support/ZeroTier/One/metricstoken.secret)" http://localhost:9993/metrics
|
||||||
|
|
||||||
// Windows PowerShell (Admin)
|
// Windows PowerShell (Admin)
|
||||||
Invoke-RestMethod -Headers @{'X-ZT1-Auth' = "$(Get-Content C:\ProgramData\ZeroTier\One\metricstoken.secret)"; } -Uri http://localhost:9993/metrics
|
Invoke-RestMethod -Headers @{'X-ZT1-Auth' = "$(Get-Content C:\ProgramData\ZeroTier\One\metricstoken.secret)"; } -Uri http://localhost:9993/metrics
|
||||||
|
|
|
@ -509,7 +509,17 @@ void Switch::onLocalEthernet(void *tPtr,const SharedPtr<Network> &network,const
|
||||||
adv[42] = (checksum >> 8) & 0xff;
|
adv[42] = (checksum >> 8) & 0xff;
|
||||||
adv[43] = checksum & 0xff;
|
adv[43] = checksum & 0xff;
|
||||||
|
|
||||||
RR->node->putFrame(tPtr,network->id(),network->userPtr(),peerMac,from,ZT_ETHERTYPE_IPV6,0,adv,72);
|
//
|
||||||
|
// call on separate background thread
|
||||||
|
// this prevents problems related to trying to do rx while inside of doing tx, such as acquiring same lock recursively
|
||||||
|
//
|
||||||
|
|
||||||
|
std::thread([=]() {
|
||||||
|
|
||||||
|
RR->node->putFrame(tPtr, network->id(), network->userPtr(), peerMac, from, ZT_ETHERTYPE_IPV6, 0, adv, 72);
|
||||||
|
|
||||||
|
}).detach();
|
||||||
|
|
||||||
return; // NDP emulation done. We have forged a "fake" reply, so no need to send actual NDP query.
|
return; // NDP emulation done. We have forged a "fake" reply, so no need to send actual NDP query.
|
||||||
} // else no NDP emulation
|
} // else no NDP emulation
|
||||||
} // else no NDP emulation
|
} // else no NDP emulation
|
||||||
|
@ -546,8 +556,18 @@ void Switch::onLocalEthernet(void *tPtr,const SharedPtr<Network> &network,const
|
||||||
data,
|
data,
|
||||||
len);
|
len);
|
||||||
} else if (to == network->mac()) {
|
} else if (to == network->mac()) {
|
||||||
|
|
||||||
// Destination is this node, so just reinject it
|
// Destination is this node, so just reinject it
|
||||||
RR->node->putFrame(tPtr,network->id(),network->userPtr(),from,to,etherType,vlanId,data,len);
|
|
||||||
|
//
|
||||||
|
// same pattern as putFrame call above
|
||||||
|
//
|
||||||
|
std::thread([=]() {
|
||||||
|
|
||||||
|
RR->node->putFrame(tPtr, network->id(), network->userPtr(), from, to, etherType, vlanId, data, len);
|
||||||
|
|
||||||
|
}).detach();
|
||||||
|
|
||||||
} else if (to[0] == MAC::firstOctetForNetwork(network->id())) {
|
} else if (to[0] == MAC::firstOctetForNetwork(network->id())) {
|
||||||
// Destination is another ZeroTier peer on the same network
|
// Destination is another ZeroTier peer on the same network
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue