Updates host pool stats when hosts are located on LAN

This commit is contained in:
Simone Mainardi 2019-03-13 11:38:06 +01:00
parent 09376c5e96
commit aa85983c3c

View file

@ -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 */