diff --git a/src/Flow.cpp b/src/Flow.cpp index 1cf93dcb5e..7943b41ab8 100644 --- a/src/Flow.cpp +++ b/src/Flow.cpp @@ -1361,7 +1361,7 @@ void Flow::update_pools_stats(const struct timeval *tv, hp = iface->getHostPools(); if(hp) { /* Client host */ - if(cli_host) { + if(cli_host && cli_host->getMac() && cli_host->getMac()->locate() == located_on_lan_interface) { cli_host_pool_id = cli_host->get_host_pool(); /* Overall host pool stats */ @@ -1384,7 +1384,7 @@ void Flow::update_pools_stats(const struct timeval *tv, } /* Server host */ - if(srv_host) { + if(srv_host && srv_host->getMac() && srv_host->getMac()->locate() == located_on_lan_interface) { srv_host_pool_id = srv_host->get_host_pool(); /* Update server pool stats only if the pool is not equal to the client pool */