fix: restoring ttl counter up to max threshold when a device is refound on arp cache

This commit is contained in:
evilsocket 2018-01-29 16:57:42 +01:00
commit 4c4a946d44

View file

@ -158,6 +158,9 @@ func (tp *Targets) AddIfNotExist(ip, mac string) *net.Endpoint {
mac = net.NormalizeMac(mac)
if t, found := tp.Targets[mac]; found {
if tp.TTL[mac] < TargetsDefaultTTL {
tp.TTL[mac]++
}
return t
}