logging: Fix for IP filtering

This commit is contained in:
Christoph Kluge 2020-11-03 00:01:58 +01:00 committed by GitHub
parent eda9a1b377
commit dd26875ffc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -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)