avoid logging stray packets (multicast, etc)

This commit is contained in:
Eugene K 2024-04-12 12:18:42 -04:00
parent 06b94a6c2a
commit 6302ed66b2
No known key found for this signature in database
GPG Key ID: C8CCB4692865B818

View File

@ -125,7 +125,9 @@ func (b *Backend) readTun() {
b.clients.Remove(dest)
}
} else {
logrus.Errorf("no client with address[%v]", dest)
if b.subnet.Contains(net.IP(dest.addr[:])) {
logrus.Errorf("no client with address[%v]", dest)
}
}
}
}