Reduce the exception noise with queries that we dont parse correctly
This commit is contained in:
@@ -50,7 +50,7 @@ final class Query
|
||||
$this->labels = collect();
|
||||
|
||||
while (($len=ord(substr($this->buf,$rx_ptr++,1))) !== 0x00) {
|
||||
$this->labels->push(substr($this->buf,$rx_ptr,$len));
|
||||
$this->labels->push(strtolower(substr($this->buf,$rx_ptr,$len)));
|
||||
$rx_ptr += $len;
|
||||
}
|
||||
|
||||
@@ -74,8 +74,8 @@ final class Query
|
||||
if ($this->arcount) {
|
||||
// Additional records, EDNS: https://datatracker.ietf.org/doc/html/rfc6891
|
||||
if (($haystack = strstr(substr($this->buf,$rx_ptr+1+10),"\x00",true)) !== FALSE) {
|
||||
Log::error(sprintf('%s:! DNS additional record format error?',self::LOGKEY));
|
||||
// @todo catch this
|
||||
Log::error(sprintf('%s:! DNS additional record format error?',self::LOGKEY),['buf'=>hex_dump($this->buf)]);
|
||||
return;
|
||||
}
|
||||
|
||||
$this->additional = new RR(substr($this->buf,$rx_ptr,(strlen($haystack) === 0) ? NULL : strlen($haystack)));
|
||||
|
Reference in New Issue
Block a user