* fix(dns): resolve CNAME chains and prevent invalid IP parsing
- Add automated in-band CNAME chain resolution to extract final A/AAAA IP addresses.
- Replace `MaxResponseAnswers` with `MaxIPs` and `MaxCNAMEs` to explicitly bound resource decoding and prevent memory exhaustion.
- Bound CNAME chain traversal to prevent infinite loops from cyclic records.
* 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
* dns: simplify @hnw function and additional fixes
---------
Co-authored-by: Yoshio HANAWA <y@hnw.jp>
* add ipv6 to xnet.StackAsync
* dns improvements
* improve DNS workings of StackAsync
* add tentative ICMPv6
* work on prefixes and fix some small bugs, plan UDP/TCP6
* fix bugs in StackAsync and ipv4.Prefix.Contains
* update arpsubtable
* completely remove legacy internet.StackIP for StackIPv4/v6
* ipv4/ipv6 tcp/udp
* add TCP6/UDP6 dialing APIs
* add xnet.Stack6 interface
* more ipv6 integration into StackAsync; various tweaks to lneto and documentation+TODOs
* add stack6 tests
* replace netip.Prefix with ipv4.Prefix where it makes sense
* begin adding dns pcap functionality
* improve question formatting
* work on capturing answers as well
* finalize DNS printing
* increase subfield limits
* add FlagContainer type
* prettier DNS printing
* add mdns
* define mdns.Client
* fix some mdns stuff
* refine dns package for use with mdns
* remove Querier and Responder and replace with Client
* add record setting methods on dns.record to reuse record buffer
* protect against unbounded client answer growth
* round off sharp mdns edges; reduce allocs
* add mutlicast to stacks; add xnet tests for mdns
* fix documentation on acceptmulticast field
* mdns working
* pcap: reuse Frame memory
* slog: reduce heap allocations of addresses; also prevent heap alloc of dhcp options in pcap
* dns: heapless improvement; add StackAsync buffer for more heapless operation; start thinking of errors
* reuse function for reclaiming frames among all protocols for lower memory usage
* remove extraneous code
* do not rely on unspecified Go behaviour; fix TCP ring buffer bug
* even more stricter error handling on tcp connections
* stricter lock copying in tcp.Conn, even though likely not a problem
* add listener and tcp pool logging
* forgot reqAddr unused
* add logging to TCPConn and friends