fix(packet): parse SOA natively to stop malformed replies (#128) #137
Reference in New Issue
Block a user
Delete Branch "fix/soa-compression-roundtrip"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
DnsRecord::UNKNOWN(opaque rdata), so RFC 1035 §3.3.13 compression pointers in MNAME/RNAME — offsets into the upstream packet — were re-emitted verbatim. Once Numa applied its own compression, those pointers landed on garbage and clients rejected the reply ("malformed reply packet" in kdig, issue #128).read_qnameand write viawrite_qname, mirroring the existing NS/CNAME/MX pattern. Adds the SOA arm torecord_rdata_canonicalfor RRSIG verification.Closes #128.
Test plan
cargo test— 354 lib tests + 1 new integration test pass.make all(fmt + clippy + audit + test) green.tests/soa_compression_bug.rs— hand-rolled upstream packet (CNAME chain + compressed SOA in authority that points into answer rdata), round-trips through Numa, validated withhickory-protostrict parse.kdig @<numa> odin.adobe.com httpsno longer reports "malformed reply packet" against the affected upstream/cache combo from the issue.