diff --git a/src/Cedar/Hub.c b/src/Cedar/Hub.c index 0a37f8e0..32a5d04c 100644 --- a/src/Cedar/Hub.c +++ b/src/Cedar/Hub.c @@ -1563,13 +1563,15 @@ void HubWatchDogThread(THREAD *t, void *param) o2 = NewListFast(NULL); // Send an ARP packet - LockList(hub->IpTable); + LockHashList(hub->IpTable); { num = LIST_NUM(hub->IpTable); for (i = 0;i < LIST_NUM(hub->IpTable);i++) { IP_TABLE_ENTRY *e = LIST_DATA(hub->IpTable, i); + if (e == NULL) continue; + if ((e->UpdatedTime + (UINT64)(IP_TABLE_EXPIRE_TIME)) > Tick64()) { if (e->MacAddress[0] != 0xff || e->MacAddress[1] != 0xff || e->MacAddress[2] != 0xff || @@ -1645,7 +1647,7 @@ void HubWatchDogThread(THREAD *t, void *param) } } } - UnlockList(hub->IpTable); + UnlockHashList(hub->MacHashTable); if ((LIST_NUM(o) + LIST_NUM(o2)) != 0) {