mirror of
https://github.com/soypat/lneto.git
synced 2026-09-02 12:59:04 +00:00
refactor(dns): eagerly decode CNAME target into r.data, drop target field
Address review feedback on #189: - Remove Resource.target: Resource.Decode expands CNAME RDATA in place into r.data (uncompressed wire format) while the full message is still available and updates header.Length, storing the name bytes exactly once. - Add Resource.CNAMEView returning a length-bounded view of the expanded target; Message.WriteAnswers uses it. - Rename matchesHost to ResourceHeader.pertainsTo. - Make ResolveConfig.MaxCNAMEs explicit: drop the silent default in Client.StartResolve and let callers opt in (x/xnet). - Reduce test suite to regression coverage only. refs #189
This commit is contained in:
@@ -631,6 +631,7 @@ func (s *StackAsync) StartLookupIPType(host string, qtype dns.Type) error {
|
||||
},
|
||||
EnableRecursion: true,
|
||||
MaxIPs: uint16(len(s.addrbufnip)),
|
||||
MaxCNAMEs: 8,
|
||||
})
|
||||
if err != nil {
|
||||
return err
|
||||
|
||||
Reference in New Issue
Block a user