From 4c4a946d44c07047ec9dd64ae01c159f9b9cca07 Mon Sep 17 00:00:00 2001 From: evilsocket Date: Mon, 29 Jan 2018 16:57:42 +0100 Subject: [PATCH] fix: restoring ttl counter up to max threshold when a device is refound on arp cache --- session/targets.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/session/targets.go b/session/targets.go index bf4ad7b7..a3f4939d 100644 --- a/session/targets.go +++ b/session/targets.go @@ -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 }