Add IP scoping data to entity.Entity and network.Connection

This commit is contained in:
Daniel
2021-03-20 22:07:17 +01:00
parent eb22636c8e
commit 43cfba8445
10 changed files with 92 additions and 63 deletions

View File

@@ -36,9 +36,8 @@ func (ep *EndpointScope) Matches(_ context.Context, entity *intel.Entity) (EPRes
return Undeterminable, nil
}
classification := netutils.ClassifyIP(entity.IP)
var scope uint8
switch classification {
switch entity.IPScope {
case netutils.HostLocal:
scope = scopeLocalhost
case netutils.LinkLocal: