fix: handle errors reported by the conntrack package

In particular, ENOBUFS which indicates data has been dropped.
With this change the collector will restart, thus resynchronising with
the OS.
This commit is contained in:
Bryan Boreham
2019-07-04 13:30:22 +00:00
parent 5a38963fd0
commit 1e6a6a7bb4

View File

@@ -147,6 +147,11 @@ func (c *conntrackWalker) run() {
if !ok {
return
}
if f.Err != nil {
log.Errorf("conntrack event error: %v", f.Err)
stop()
return
}
if c.relevant(f) {
c.handleFlow(f)
}