From 0bc3d4cf60ff0d053293550e3af5d1b49bd564d8 Mon Sep 17 00:00:00 2001 From: Deon George Date: Sat, 1 Jun 2024 12:55:44 +1000 Subject: [PATCH] Downgrade DNS query errors, since they are handled --- app/Classes/Protocol/DNS.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/app/Classes/Protocol/DNS.php b/app/Classes/Protocol/DNS.php index 1c22c2b..309bb15 100644 --- a/app/Classes/Protocol/DNS.php +++ b/app/Classes/Protocol/DNS.php @@ -110,7 +110,7 @@ final class DNS extends BaseProtocol $this->query = new BaseProtocol\DNS\Query($this->client->read(0,512)); } catch (\Exception $e) { - Log::error(sprintf('%s:! Ignoring bad DNS query (%s)',self::LOGKEY,$e->getMessage())); + Log::notice(sprintf('%s:! Ignoring bad DNS query (%s)',self::LOGKEY,$e->getMessage())); return FALSE; } @@ -119,7 +119,7 @@ final class DNS extends BaseProtocol // If the wrong class if ($this->query->class !== self::DNS_QUERY_IN) { - Log::error(sprintf('%s:! We only service Internet queries [%d]',self::LOGKEY,$this->query->class)); + Log::notice(sprintf('%s:! We only service Internet queries [%d]',self::LOGKEY,$this->query->class)); return $this->reply(self::DNS_NOTIMPLEMENTED,[],$this->soa()); } @@ -272,7 +272,7 @@ final class DNS extends BaseProtocol // Other attributes return NOTIMPL default: - Log::error(sprintf('%s:! We dont support DNS query types [%d]',self::LOGKEY,$this->query->type)); + Log::notice(sprintf('%s:! We dont support DNS query types [%d]',self::LOGKEY,$this->query->type)); return $this->reply(self::DNS_NOTIMPLEMENTED,[],$this->soa()); } @@ -309,14 +309,14 @@ final class DNS extends BaseProtocol private function nameerr(): int { - Log::error(sprintf('%s:! DNS query for a resource we dont manage [%s]',self::LOGKEY,$this->query->domain)); + Log::notice(sprintf('%s:! DNS query for a resource we dont manage [%s]',self::LOGKEY,$this->query->domain)); return $this->reply(self::DNS_NAMEERR,[],$this->soa()); } private function nodata(): int { - Log::error(sprintf('%s:! DNS query for a resource we dont manage [%s] in our zone(s)',self::LOGKEY,$this->query->domain)); + Log::notice(sprintf('%s:! DNS query for a resource we dont manage [%s] in our zone(s)',self::LOGKEY,$this->query->domain)); return $this->reply(self::DNS_NOERROR,[],$this->soa()); }