summaryrefslogtreecommitdiff
path: root/node
diff options
context:
space:
mode:
authorAdam Ierymenko <adam.ierymenko@gmail.com>2016-08-26 12:21:44 -0700
committerAdam Ierymenko <adam.ierymenko@gmail.com>2016-08-26 12:21:44 -0700
commit90f3e94565c735858af3e8ad891eab48f4c09659 (patch)
tree1e93a10f54d7004ad0c1bd3159dc1536f1f03d21 /node
parentded5a53a6ce5f6de2f5ebfc76f5d1ca68edc605b (diff)
downloadinfinitytier-90f3e94565c735858af3e8ad891eab48f4c09659.tar.gz
infinitytier-90f3e94565c735858af3e8ad891eab48f4c09659.zip
Always output trace info when debugging rules.
Diffstat (limited to 'node')
-rw-r--r--node/Network.cpp49
1 files changed, 24 insertions, 25 deletions
diff --git a/node/Network.cpp b/node/Network.cpp
index 0bbf070c..629e37d9 100644
--- a/node/Network.cpp
+++ b/node/Network.cpp
@@ -183,31 +183,30 @@ static int _doZtFilter(
} continue;
case ZT_NETWORK_RULE_ACTION_DEBUG_LOG:
#ifdef ZT_RULES_ENGINE_DEBUGGING
- if (thisSetMatches) {
- printf(" _ " ZT_EOL_S);
- for(std::vector<std::string>::iterator m(dlog.begin());m!=dlog.end();++m)
- printf(" | %s" ZT_EOL_S,m->c_str());
- printf(" + MATCH %s->%s %.2x:%.2x:%.2x:%.2x:%.2x:%.2x->%.2x:%.2x:%.2x:%.2x:%.2x:%.2x inbound=%d noRedirect=%d frameLen=%u etherType=%u" ZT_EOL_S,
- ztSource.toString().c_str(),
- ztDest.toString().c_str(),
- (unsigned int)macSource[0],
- (unsigned int)macSource[1],
- (unsigned int)macSource[2],
- (unsigned int)macSource[3],
- (unsigned int)macSource[4],
- (unsigned int)macSource[5],
- (unsigned int)macDest[0],
- (unsigned int)macDest[1],
- (unsigned int)macDest[2],
- (unsigned int)macDest[3],
- (unsigned int)macDest[4],
- (unsigned int)macDest[5],
- (int)inbound,
- (int)noRedirect,
- frameLen,
- etherType
- );
- }
+ printf(" _ " ZT_EOL_S);
+ for(std::vector<std::string>::iterator m(dlog.begin());m!=dlog.end();++m)
+ printf(" | %s" ZT_EOL_S,m->c_str());
+ printf(" + %c %s->%s %.2x:%.2x:%.2x:%.2x:%.2x:%.2x->%.2x:%.2x:%.2x:%.2x:%.2x:%.2x inbound=%d noRedirect=%d frameLen=%u etherType=%u" ZT_EOL_S,
+ ((thisSetMatches) ? 'Y' : 'n'),
+ ztSource.toString().c_str(),
+ ztDest.toString().c_str(),
+ (unsigned int)macSource[0],
+ (unsigned int)macSource[1],
+ (unsigned int)macSource[2],
+ (unsigned int)macSource[3],
+ (unsigned int)macSource[4],
+ (unsigned int)macSource[5],
+ (unsigned int)macDest[0],
+ (unsigned int)macDest[1],
+ (unsigned int)macDest[2],
+ (unsigned int)macDest[3],
+ (unsigned int)macDest[4],
+ (unsigned int)macDest[5],
+ (int)inbound,
+ (int)noRedirect,
+ frameLen,
+ etherType
+ );
dlog.clear();
#endif // ZT_RULES_ENGINE_DEBUGGING
thisSetMatches = 1; // DEBUG_LOG does not terminate evaluation