mirror of
https://github.com/ntop/ntopng.git
synced 2026-05-22 10:45:57 +00:00
Fixes getMac on view interfaces
This commit is contained in:
parent
aaf84a6261
commit
7abdbcd56a
4 changed files with 32 additions and 11 deletions
|
|
@ -4657,20 +4657,12 @@ void NetworkInterface::runHousekeepingTasks() {
|
|||
|
||||
/* **************************************************** */
|
||||
|
||||
Mac* NetworkInterface::getMac(u_int8_t _mac[6], u_int16_t vlanId,
|
||||
bool createIfNotPresent) {
|
||||
Mac* NetworkInterface::getMac(u_int8_t _mac[6], u_int16_t vlanId, bool createIfNotPresent) {
|
||||
Mac *ret = NULL;
|
||||
|
||||
if(_mac == NULL) return(NULL);
|
||||
|
||||
if(!isView())
|
||||
ret = macs_hash->get(vlanId, _mac);
|
||||
else {
|
||||
for(u_int8_t s = 0; s<numSubInterfaces; s++) {
|
||||
if((ret = subInterfaces[s]->get_macs_hash()->get(vlanId, _mac)) != NULL)
|
||||
break;
|
||||
}
|
||||
}
|
||||
ret = macs_hash->get(vlanId, _mac);
|
||||
|
||||
if((ret == NULL) && createIfNotPresent) {
|
||||
try {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue