diff --git a/include/Host.h b/include/Host.h index dd927191c6..642e63308d 100644 --- a/include/Host.h +++ b/include/Host.h @@ -192,7 +192,6 @@ class Host : public GenericHost { void setQuota(u_int32_t new_quota); void loadAlertPrefs(void); void getPeerBytes(lua_State* vm, u_int32_t peer_key); - void setDeviceIfIdx(u_int32_t ip, u_int16_t v); inline u_int16_t getDeviceIfIdx() { return(deviceIfIdx); } inline void incIngressNetworkStats(int16_t networkId, u_int64_t num_bytes) { if(networkStats) networkStats->incIngress(num_bytes); }; inline void incEgressNetworkStats(int16_t networkId, u_int64_t num_bytes) { if(networkStats) networkStats->incEgress(num_bytes); }; diff --git a/src/Host.cpp b/src/Host.cpp index f770594acd..4cdd0d2e65 100644 --- a/src/Host.cpp +++ b/src/Host.cpp @@ -1491,23 +1491,6 @@ void Host::incrVisitedWebSite(char *hostname) { /* *************************************** */ -void Host::setDeviceIfIdx(u_int32_t _ip, u_int16_t _v) { - char dev[48], port[16], value[128], buf[128], buf1[32]; - - deviceIfIdx = _v, deviceIP = _ip; - - snprintf(dev, sizeof(dev), "flow_devs.%s", Utils::intoaV4(deviceIP, buf, sizeof(buf))); - snprintf(port, sizeof(port), "%u", deviceIfIdx); - - snprintf(value, sizeof(value), "%s/%s", - Utils::formatMac(mac ? mac->get_mac() : NULL, buf1, sizeof(buf1)), - ip.print(buf, sizeof(buf))); - - ntop->getRedis()->hashSet(dev, port, value); -} - -/* *************************************** */ - void Host::incActivityBytes(UserActivityID id, u_int64_t upbytes, u_int64_t downbytes, u_int64_t bgbytes) { if(user_activities) user_activities->incBytes(id, upbytes, downbytes, bgbytes); } diff --git a/src/NetworkInterface.cpp b/src/NetworkInterface.cpp index 2f8afdc25a..1a0664c3c1 100644 --- a/src/NetworkInterface.cpp +++ b/src/NetworkInterface.cpp @@ -751,17 +751,6 @@ Flow* NetworkInterface::getFlow(u_int8_t *src_eth, u_int8_t *dst_eth, if(flows_hash->add(ret)) { *src2dst_direction = true; - if(inIndex && ret->get_cli_host()) { - Host *host = (Host*)ret->get_cli_host(); - - if(host->isLocalHost() || host->isSystemHost()) - ret->get_cli_host()->setDeviceIfIdx(deviceIP, inIndex); - } - - /* - We have decided to set only ingress traffic to make sure we do not mix truth with invalid data - if(outIndex && ret->get_srv_host()) ret->get_srv_host()->setDeviceIfIdx(deviceIP, outIndex); - */ return(ret); } else { delete ret;