Skip to content
Merged
Show file tree
Hide file tree
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
7 changes: 7 additions & 0 deletions containers/container.go
Original file line number Diff line number Diff line change
Expand Up @@ -829,6 +829,13 @@ func (c *Container) createConnectionFromSocketInfo(pid uint32, fd uint64, timest
if socketInfo == nil || !socketInfo.Valid {
return nil, false
}
// connectionKey applies the same filter below; checking it first skips
// the parsing and the kernel map lookup for the commonest case. A TLS
// server's accepted sockets have a client's ephemeral port as their
// destination, are never tracked, and come through here on every event.
if common.PortFilter.ShouldBeSkipped(socketInfo.DstPort) {
return nil, true
}

// Parse destination IP
dstIP, err := netaddr.ParseIP(socketInfo.DstIP)
Expand Down
4 changes: 4 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,10 @@ func main() {
flag.Set("logtostderr", "false")
flag.Set("alsologtostderr", "false")
flag.Set("stderrthreshold", "FATAL")
// SetOutput gives every severity the same writer, and klog writes a
// message to its own severity's writer and every lower one's: without
// one_output each warning was logged twice and each error three times.
flag.Set("one_output", "true")
klog.SetOutput(&RateLimitedLogOutput{limiter: rate.NewLimiter(rate.Limit(*flags.LogPerSecond), *flags.LogBurst)})

klog.Infoln("agent version:", version)
Expand Down
Loading