Skip to content

Commit 92a0cc4

Browse files
jasnelladuh95
authored andcommitted
dns: share reply parsing skeleton between record parsers
The MX, CAA, TLSA, TXT, SRV, and NAPTR reply parsers each repeated the same structure: lazily create the record dictionary template, parse the reply, iterate the answer section filtering by record type, build and append each record, and report ENODATA when nothing matched. Factor that into GetRecordTemplate(), ForEachAnswer(), and AppendRecord() helpers so each parser only contains its record-specific extraction. Behavior is unchanged, including TLSA results being indexed by answer position and never reporting ENODATA. Assisted-by: Claude Signed-off-by: James M Snell <jasnell@gmail.com> PR-URL: #67497 Reviewed-By: Gürgün Dayıoğlu <hey@gurgun.day> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
1 parent d070e62 commit 92a0cc4

1 file changed

Lines changed: 246 additions & 353 deletions

File tree

0 commit comments

Comments
 (0)