mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2025-04-19 05:26:54 +02:00
Merge branch 'dev' into build-fix
This commit is contained in:
commit
b00dc0c05e
4 changed files with 31 additions and 9 deletions
|
@ -207,7 +207,8 @@ public:
|
|||
memset(&data,0,sizeof(data));
|
||||
OSUtils::ztsnprintf(inport,sizeof(inport),"%d",localPort);
|
||||
|
||||
if ((UPNP_GetValidIGD(devlist,&urls,&data,lanaddr,sizeof(lanaddr)))&&(lanaddr[0])) {
|
||||
int foundValidIGD = 0;
|
||||
if ((foundValidIGD = UPNP_GetValidIGD(devlist,&urls,&data,lanaddr,sizeof(lanaddr)))&&(lanaddr[0])) {
|
||||
#ifdef ZT_PORTMAPPER_TRACE
|
||||
PM_TRACE("PortMapper: UPnP: my LAN IP address: %s" ZT_EOL_S,lanaddr);
|
||||
#endif
|
||||
|
@ -282,9 +283,11 @@ public:
|
|||
PM_TRACE("PortMapper: UPnP: UPNP_GetValidIGD failed, returning to NAT-PMP mode" ZT_EOL_S);
|
||||
#endif
|
||||
}
|
||||
|
||||
freeUPNPDevlist(devlist);
|
||||
|
||||
if(foundValidIGD) {
|
||||
FreeUPNPUrls(&urls);
|
||||
}
|
||||
} else {
|
||||
mode = 0;
|
||||
#ifdef ZT_PORTMAPPER_TRACE
|
||||
|
|
|
@ -1793,6 +1793,8 @@ public:
|
|||
_node->join(wantnw, (void*)0, (void*)0);
|
||||
auto out = json::object();
|
||||
Mutex::Lock l(_nets_m);
|
||||
bool allowDefault = false;
|
||||
|
||||
if (!_nets.empty()) {
|
||||
NetworkState &ns = _nets[wantnw];
|
||||
try {
|
||||
|
@ -1806,8 +1808,9 @@ public:
|
|||
if (allowGlobal.is_boolean()) {
|
||||
ns.setAllowGlobal((bool)allowGlobal);
|
||||
}
|
||||
json& allowDefault = j["allowDefault"];
|
||||
if (allowDefault.is_boolean()) {
|
||||
json& _allowDefault = j["allowDefault"];
|
||||
if (_allowDefault.is_boolean()) {
|
||||
allowDefault = _allowDefault;
|
||||
ns.setAllowDefault((bool)allowDefault);
|
||||
}
|
||||
json& allowDNS = j["allowDNS"];
|
||||
|
@ -1824,7 +1827,17 @@ public:
|
|||
|
||||
_networkToJson(out, ns);
|
||||
}
|
||||
#ifdef __FreeBSD__
|
||||
if(!!allowDefault){
|
||||
res.status = 400;
|
||||
setContent(req, res, "Allow Default does not work properly on FreeBSD. See #580");
|
||||
} else {
|
||||
setContent(req, res, out.dump());
|
||||
|
||||
}
|
||||
#else
|
||||
setContent(req, res, out.dump());
|
||||
#endif
|
||||
};
|
||||
_controlPlane.Post("/network/([0-9a-fA-F]{16})", networkPost);
|
||||
_controlPlane.Put("/network/([0-9a-fA-F]){16}", networkPost);
|
||||
|
|
|
@ -25,10 +25,11 @@
|
|||
#define __TAP_H
|
||||
|
||||
#ifndef NDIS_SUPPORT_NDIS6
|
||||
#define NDIS_SUPPORT_NDIS6 1
|
||||
#define NDIS_SUPPORT_NDIS61 1
|
||||
#define NDIS_WDM1 1
|
||||
#define NDIS61_MINIPORT 1
|
||||
#define NDIS_MINIPORT_DRIVER 1
|
||||
#define NDIS_SUPPORT_NDIS6 1
|
||||
#define NDIS_SUPPORT_NDIS630 1
|
||||
#define NDIS_WDM1 1
|
||||
#define NDIS630_MINIPORT 1
|
||||
#endif
|
||||
|
||||
#include <ntifs.h>
|
||||
|
|
|
@ -35,7 +35,8 @@ Provider = "ZeroTier"
|
|||
|
||||
[Manufacturer]
|
||||
%Provider%=zttap300,NTx86
|
||||
;%Provider%=zttap300,NTamd64
|
||||
%Provider%=zttap300,NTamd64
|
||||
%Provider%=zttap300,NTarm64
|
||||
|
||||
[zttap300.NTx86]
|
||||
%DeviceDescription% = zttap300.ndi, root\zttap300 ; Root enumerated
|
||||
|
@ -45,6 +46,10 @@ Provider = "ZeroTier"
|
|||
%DeviceDescription% = zttap300.ndi, root\zttap300 ; Root enumerated
|
||||
%DeviceDescription% = zttap300.ndi, zttap300 ; Legacy
|
||||
|
||||
[zttap300.NTarm64]
|
||||
%DeviceDescription% = zttap300.ndi, root\zttap300 ; Root enumerated
|
||||
%DeviceDescription% = zttap300.ndi, zttap300 ; Legacy
|
||||
|
||||
;----------------- Characteristics ------------
|
||||
; NCF_PHYSICAL = 0x04
|
||||
; NCF_VIRTUAL = 0x01
|
||||
|
|
Loading…
Add table
Reference in a new issue