Do not add internal and localhost connections to history

This commit is contained in:
Daniel
2023-08-11 11:56:22 +02:00
parent 9ccdfad328
commit 3b70c5587c
3 changed files with 18 additions and 8 deletions

View File

@@ -127,7 +127,7 @@ func (mng *Manager) HandleFeed(ctx context.Context, feed <-chan *network.Connect
// Save to netquery database.
// Do not include internal connections in history.
if err := mng.store.Save(ctx, *model, conn.HistoryEnabled && !conn.Internal); err != nil {
if err := mng.store.Save(ctx, *model, conn.HistoryEnabled); err != nil {
log.Errorf("netquery: failed to save connection %s in sqlite database: %s", conn.ID, err)
return
}