|
@@ -566,9 +566,9 @@ Network::Network(const RuntimeEnvironment *renv,void *tPtr,uint64_t nwid,void *u
|
|
int n = RR->node->stateObjectGet(tPtr,ZT_STATE_OBJECT_NETWORK_CONFIG,tmp,dict->unsafeData(),ZT_NETWORKCONFIG_DICT_CAPACITY - 1);
|
|
int n = RR->node->stateObjectGet(tPtr,ZT_STATE_OBJECT_NETWORK_CONFIG,tmp,dict->unsafeData(),ZT_NETWORKCONFIG_DICT_CAPACITY - 1);
|
|
if (n > 1) {
|
|
if (n > 1) {
|
|
try {
|
|
try {
|
|
- ScopedPtr<NetworkConfig> nconf(new NetworkConfig());
|
|
|
|
- if (nconf->fromDictionary(*dict)) {
|
|
|
|
- this->setConfiguration(tPtr,*nconf,false);
|
|
|
|
|
|
+ ScopedPtr<NetworkConfig> nconf2(new NetworkConfig());
|
|
|
|
+ if (nconf2->fromDictionary(*dict)) {
|
|
|
|
+ this->setConfiguration(tPtr,*nconf2,false);
|
|
_lastConfigUpdate = 0; // still want to re-request an update since it's likely outdated
|
|
_lastConfigUpdate = 0; // still want to re-request an update since it's likely outdated
|
|
got = true;
|
|
got = true;
|
|
}
|
|
}
|
|
@@ -671,8 +671,8 @@ bool Network::filterOutgoingPacket(
|
|
} break;
|
|
} break;
|
|
|
|
|
|
case DOZTFILTER_DROP:
|
|
case DOZTFILTER_DROP:
|
|
- if (_config.remoteTraceTarget)
|
|
|
|
- RR->t->networkFilter(tPtr,*this,rrl,(Trace::RuleResultLog *)0,(Capability *)0,ztSource,ztDest,macSource,macDest,frameData,frameLen,etherType,vlanId,noTee,false,0);
|
|
|
|
|
|
+ //if (_config.remoteTraceTarget)
|
|
|
|
+ // RR->t->networkFilter(tPtr,*this,rrl,(Trace::RuleResultLog *)0,(Capability *)0,ztSource,ztDest,macSource,macDest,frameData,frameLen,etherType,vlanId,noTee,false,0);
|
|
return false;
|
|
return false;
|
|
|
|
|
|
case DOZTFILTER_REDIRECT: // interpreted as ACCEPT but ztFinalDest will have been changed in _doZtFilter()
|
|
case DOZTFILTER_REDIRECT: // interpreted as ACCEPT but ztFinalDest will have been changed in _doZtFilter()
|
|
@@ -712,17 +712,17 @@ bool Network::filterOutgoingPacket(
|
|
outp.compress();
|
|
outp.compress();
|
|
RR->sw->send(tPtr,outp,true);
|
|
RR->sw->send(tPtr,outp,true);
|
|
|
|
|
|
- if (_config.remoteTraceTarget)
|
|
|
|
- RR->t->networkFilter(tPtr,*this,rrl,(localCapabilityIndex >= 0) ? &crrl : (Trace::RuleResultLog *)0,(localCapabilityIndex >= 0) ? &(_config.capabilities[localCapabilityIndex]) : (Capability *)0,ztSource,ztDest,macSource,macDest,frameData,frameLen,etherType,vlanId,noTee,false,0);
|
|
|
|
|
|
+ //if (_config.remoteTraceTarget)
|
|
|
|
+ // RR->t->networkFilter(tPtr,*this,rrl,(localCapabilityIndex >= 0) ? &crrl : (Trace::RuleResultLog *)0,(localCapabilityIndex >= 0) ? &(_config.capabilities[localCapabilityIndex]) : (Capability *)0,ztSource,ztDest,macSource,macDest,frameData,frameLen,etherType,vlanId,noTee,false,0);
|
|
return false; // DROP locally, since we redirected
|
|
return false; // DROP locally, since we redirected
|
|
} else {
|
|
} else {
|
|
- if (_config.remoteTraceTarget)
|
|
|
|
- RR->t->networkFilter(tPtr,*this,rrl,(localCapabilityIndex >= 0) ? &crrl : (Trace::RuleResultLog *)0,(localCapabilityIndex >= 0) ? &(_config.capabilities[localCapabilityIndex]) : (Capability *)0,ztSource,ztDest,macSource,macDest,frameData,frameLen,etherType,vlanId,noTee,false,1);
|
|
|
|
|
|
+ //if (_config.remoteTraceTarget)
|
|
|
|
+ // RR->t->networkFilter(tPtr,*this,rrl,(localCapabilityIndex >= 0) ? &crrl : (Trace::RuleResultLog *)0,(localCapabilityIndex >= 0) ? &(_config.capabilities[localCapabilityIndex]) : (Capability *)0,ztSource,ztDest,macSource,macDest,frameData,frameLen,etherType,vlanId,noTee,false,1);
|
|
return true;
|
|
return true;
|
|
}
|
|
}
|
|
} else {
|
|
} else {
|
|
- if (_config.remoteTraceTarget)
|
|
|
|
- RR->t->networkFilter(tPtr,*this,rrl,(localCapabilityIndex >= 0) ? &crrl : (Trace::RuleResultLog *)0,(localCapabilityIndex >= 0) ? &(_config.capabilities[localCapabilityIndex]) : (Capability *)0,ztSource,ztDest,macSource,macDest,frameData,frameLen,etherType,vlanId,noTee,false,0);
|
|
|
|
|
|
+ //if (_config.remoteTraceTarget)
|
|
|
|
+ // RR->t->networkFilter(tPtr,*this,rrl,(localCapabilityIndex >= 0) ? &crrl : (Trace::RuleResultLog *)0,(localCapabilityIndex >= 0) ? &(_config.capabilities[localCapabilityIndex]) : (Capability *)0,ztSource,ztDest,macSource,macDest,frameData,frameLen,etherType,vlanId,noTee,false,0);
|
|
return false;
|
|
return false;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -793,8 +793,8 @@ int Network::filterIncomingPacket(
|
|
} break;
|
|
} break;
|
|
|
|
|
|
case DOZTFILTER_DROP:
|
|
case DOZTFILTER_DROP:
|
|
- if (_config.remoteTraceTarget)
|
|
|
|
- RR->t->networkFilter(tPtr,*this,rrl,(Trace::RuleResultLog *)0,(Capability *)0,sourcePeer->address(),ztDest,macSource,macDest,frameData,frameLen,etherType,vlanId,false,true,0);
|
|
|
|
|
|
+ //if (_config.remoteTraceTarget)
|
|
|
|
+ // RR->t->networkFilter(tPtr,*this,rrl,(Trace::RuleResultLog *)0,(Capability *)0,sourcePeer->address(),ztDest,macSource,macDest,frameData,frameLen,etherType,vlanId,false,true,0);
|
|
return 0; // DROP
|
|
return 0; // DROP
|
|
|
|
|
|
case DOZTFILTER_REDIRECT: // interpreted as ACCEPT but ztFinalDest will have been changed in _doZtFilter()
|
|
case DOZTFILTER_REDIRECT: // interpreted as ACCEPT but ztFinalDest will have been changed in _doZtFilter()
|
|
@@ -832,14 +832,14 @@ int Network::filterIncomingPacket(
|
|
outp.compress();
|
|
outp.compress();
|
|
RR->sw->send(tPtr,outp,true);
|
|
RR->sw->send(tPtr,outp,true);
|
|
|
|
|
|
- if (_config.remoteTraceTarget)
|
|
|
|
- RR->t->networkFilter(tPtr,*this,rrl,(c) ? &crrl : (Trace::RuleResultLog *)0,c,sourcePeer->address(),ztDest,macSource,macDest,frameData,frameLen,etherType,vlanId,false,true,0);
|
|
|
|
|
|
+ //if (_config.remoteTraceTarget)
|
|
|
|
+ // RR->t->networkFilter(tPtr,*this,rrl,(c) ? &crrl : (Trace::RuleResultLog *)0,c,sourcePeer->address(),ztDest,macSource,macDest,frameData,frameLen,etherType,vlanId,false,true,0);
|
|
return 0; // DROP locally, since we redirected
|
|
return 0; // DROP locally, since we redirected
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
- if (_config.remoteTraceTarget)
|
|
|
|
- RR->t->networkFilter(tPtr,*this,rrl,(c) ? &crrl : (Trace::RuleResultLog *)0,c,sourcePeer->address(),ztDest,macSource,macDest,frameData,frameLen,etherType,vlanId,false,true,accept);
|
|
|
|
|
|
+ //if (_config.remoteTraceTarget)
|
|
|
|
+ // RR->t->networkFilter(tPtr,*this,rrl,(c) ? &crrl : (Trace::RuleResultLog *)0,c,sourcePeer->address(),ztDest,macSource,macDest,frameData,frameLen,etherType,vlanId,false,true,accept);
|
|
return accept;
|
|
return accept;
|
|
}
|
|
}
|
|
|
|
|