mirror of
https://github.com/ntop/ntopng.git
synced 2026-05-06 03:45:26 +00:00
Fix invalid host serialization for MAC-based interfaces
This commit is contained in:
parent
80ed58464e
commit
685bab35f4
2 changed files with 4 additions and 4 deletions
|
|
@ -103,7 +103,7 @@ class Host : public GenericHashEntry, public AlertableEntity {
|
|||
virtual bool isLocalHost() const = 0;
|
||||
virtual bool isSystemHost() const = 0;
|
||||
inline bool isBroadcastDomainHost() const { return(is_in_broadcast_domain); };
|
||||
inline bool serializeByMac() const { return((isBroadcastDomainHost() || isDhcpHost()) && iface->serializeLbdHostsAsMacs()); }
|
||||
inline bool serializeByMac() const { return(isLocalHost() && iface->serializeLbdHostsAsMacs()); }
|
||||
inline bool isDhcpHost() const { return(is_dhcp_host); };
|
||||
inline void setBroadcastDomainHost() { is_in_broadcast_domain = true; };
|
||||
inline void setSystemHost() { /* TODO: remove */ };
|
||||
|
|
|
|||
|
|
@ -1473,10 +1473,10 @@ char* Host::get_tskey(char *buf, size_t bufsize) {
|
|||
char *k;
|
||||
Mac *cur_mac = getMac(); /* Cache macs as they can be swapped/updated */
|
||||
|
||||
if(serializeByMac()) {
|
||||
if(serializeByMac())
|
||||
k = get_mac_based_tskey(cur_mac, buf, bufsize);
|
||||
} else
|
||||
else
|
||||
k = get_hostkey(buf, bufsize);
|
||||
|
||||
|
||||
return(k);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue