Fix bad mac traffic increment in nedge

This commit is contained in:
emanuele-f 2018-05-21 17:42:01 +02:00
parent 63c0e5a086
commit 43e5fe08fc

View file

@ -1021,17 +1021,7 @@ Flow* NetworkInterface::getFlow(Mac *srcMac, Mac *dstMac,
}
if((dstHost = (*src2dst_direction) ? ret->get_srv_host() : ret->get_cli_host())) {
if(dstMac->isSpecialMac()) {
if(getIfType() == interface_type_NETFILTER) {
/*
In this case the destination Mac is unknown and thus we need to
increase the bytes/packets counters for the flow peer (if set)
*/
if(!dstHost->getMac()->isSpecialMac())
dstHost->getMac()->incRcvdStats(1, rawsize);
}
} else if((!dstMac->isSpecialMac()) && (primary_mac = dstHost->getMac()) && primary_mac != dstMac) {
if((!dstMac->isSpecialMac()) && (primary_mac = dstHost->getMac()) && primary_mac != dstMac) {
#ifdef MAC_DEBUG
char buf[32], bufm1[32], bufm2[32];
ntop->getTrace()->traceEvent(TRACE_NORMAL,