From 1615b413a7b823d8b50dac0c2f22ea6e9d3c3ff7 Mon Sep 17 00:00:00 2001 From: Deon George Date: Fri, 24 May 2024 12:34:28 +1000 Subject: [PATCH] Assume f0 for DNS queries that dont pass an f in the query --- app/Classes/Protocol/DNS.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/app/Classes/Protocol/DNS.php b/app/Classes/Protocol/DNS.php index d45bf4f..1c22c2b 100644 --- a/app/Classes/Protocol/DNS.php +++ b/app/Classes/Protocol/DNS.php @@ -197,9 +197,14 @@ final class DNS extends BaseProtocol // First label should be p.. or f.. if (! is_null($p=$this->parse('p',$labels->first()))) $labels->shift(); + else + $p = 0; - if (is_null($f=$this->parse('f',$labels->shift()))) - return $this->nameerr(); + // We'll assume f0 + if (! is_null($f=$this->parse('f',$labels->first()))) + $labels->shift(); + else + $f = 0; if (is_null($n=$this->parse('n',$labels->shift()))) return $this->nameerr();