diff options
author | gVisor bot <gvisor-bot@google.com> | 2020-04-29 20:43:22 +0000 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2020-04-29 20:43:22 +0000 |
commit | 5b5f6ea0d7c5566f7c2667845037d8b626f4d536 (patch) | |
tree | 44cae243c0537cc088d8933751a62cb24705adcb /pkg/sentry/socket | |
parent | 3c9938407e3139ada541743ed65434a498c746be (diff) | |
parent | a105d185ff9fc24f5bf0c1ca28cbc0f7ec7c4ea5 (diff) |
Merge release-20200413.0-23-ga105d18 (automated)
Diffstat (limited to 'pkg/sentry/socket')
-rw-r--r-- | pkg/sentry/socket/netfilter/netfilter.go | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/pkg/sentry/socket/netfilter/netfilter.go b/pkg/sentry/socket/netfilter/netfilter.go index 878f81fd5..72d093aa8 100644 --- a/pkg/sentry/socket/netfilter/netfilter.go +++ b/pkg/sentry/socket/netfilter/netfilter.go @@ -53,9 +53,14 @@ type metadata struct { Size uint32 } +// enableLogging controls whether to log the (de)serialization of netfilter +// structs between userspace and netstack. These logs are useful when +// developing iptables, but can pollute sentry logs otherwise. +const enableLogging = false + // nflog logs messages related to the writing and reading of iptables. func nflog(format string, args ...interface{}) { - if log.IsLogging(log.Debug) { + if enableLogging && log.IsLogging(log.Debug) { log.Debugf("netfilter: "+format, args...) } } |