cleanup: move bogon checking code in netxlite (#562)

I develop this diff while working on https://github.com/ooni/probe/issues/1803#issuecomment-957323297.

While there, make sure we don't have duplicate bogon code
and always use the code inside netxlite.
This commit is contained in:
Simone Basso 2021-11-02 12:20:04 +01:00 committed by GitHub
commit f91de2ecd6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 23 additions and 63 deletions

View file

@ -175,7 +175,7 @@ func (r *resolverDB) computeOddityLookupHost(addrs []string, err error) Oddity {
}
}
for _, addr := range addrs {
if isBogon(addr) {
if netxlite.IsBogon(addr) {
return OddityDNSLookupBogon
}
}