Skip to content

Commit 0525112

Browse files
committed
[dns] Parse all answers from response, not just first one
1 parent 8a20b48 commit 0525112

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Protocol/Parser.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,10 @@ public function parseAnswer(Message $message)
154154

155155
$message->answers[] = $record;
156156

157+
if ($message->header->get('anCount') != count($message->answers)) {
158+
return $this->parseAnswer($message);
159+
}
160+
157161
return $message;
158162
}
159163

0 commit comments

Comments
 (0)