Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions pkg/guestagent/guestagent_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,11 @@ func New(ctx context.Context, newTicker func() (<-chan time.Time, func()), iptab
return nil, err
}
}

go a.setWorthCheckingIPTablesRoutine(auditClient, iptablesIdle)
} else {
a.worthCheckingIPTables = true
}

a.worthCheckingIPTables = true // allow initial iptables scan
go a.setWorthCheckingIPTablesRoutine(auditClient, iptablesIdle)

logrus.Infof("Auditing enabled (%d)", auditStatus.Enabled)
return startGuestAgentRoutines(ctx, a, true), nil
}
Expand Down Expand Up @@ -111,7 +111,8 @@ type agent struct {
// when no NETFILTER_CFG audit message was received for the iptablesIdle time.
func (a *agent) setWorthCheckingIPTablesRoutine(auditClient *libaudit.AuditClient, iptablesIdle time.Duration) {
logrus.Info("setWorthCheckingIPTablesRoutine(): monitoring netfilter audit events")
var latestTrue time.Time
// Initialize to now so the first sleeper loop does not immediately mark it false.
latestTrue := time.Now()
go func() {
for {
time.Sleep(iptablesIdle)
Expand Down
Loading