Replace None with ?? in geolocation

This commit is contained in:
2021-09-30 23:12:27 +02:00
parent 6810202f3f
commit 5535a88fb1
2 changed files with 4 additions and 1 deletions

View File

@@ -28,5 +28,8 @@ func (s *HoneypotServer) LookupCountry(ip net.IP) string {
s.Logger.Warnw("Error doing geoip lookup", "error", err)
return "??"
}
if record.Country.ISOCode == "None" {
return "??"
}
return record.Country.ISOCode
}