From dd26875ffcbec8b74234bdda64e019a8a20c37e2 Mon Sep 17 00:00:00 2001 From: Christoph Kluge Date: Tue, 3 Nov 2020 00:01:58 +0100 Subject: [PATCH] logging: Fix for IP filtering --- modules/logging/filters.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/logging/filters.go b/modules/logging/filters.go index 3bc1e2cb..a5a917de 100644 --- a/modules/logging/filters.go +++ b/modules/logging/filters.go @@ -141,7 +141,7 @@ func (m IPMaskFilter) Filter(in zapcore.Field) zapcore.Field { return in } mask := m.v4Mask - if ipAddr.To16() != nil { + if ipAddr.To4() == nil { mask = m.v6Mask } masked := ipAddr.Mask(mask)