Overview
Implement EDNS(0) (Extension Mechanisms for DNS) support as defined in RFC 6891. This is a prerequisite for DNSSEC support (#2) and enables larger UDP payloads and extended flags.
Parent Issue
Background
EDNS(0) extends DNS by adding a pseudo-record (OPT, type 41) to the Additional section. Key capabilities:
- DO (DNSSEC OK) bit: Signals that the client wants DNSSEC records
- Larger UDP payloads: Up to 4096 bytes vs. the legacy 512-byte limit
- Extended RCODE: 12-bit response codes vs. 4-bit legacy
- Client Subnet: Future support for EDNS Client Subnet (ECS)
Coordination
This work overlaps with #29 (Performance Tuning) since both involve buffer management:
- Consider
Span<T> and Memory<T> for parsing
- Use
ArrayPool<byte> for buffer allocation
- Coordinate changes to avoid duplicate refactoring
Implementation Tasks
OPT Record Parsing
OPT Record Serialization
DnsMessage Integration
Buffer Management
Configuration
Testing
Technical References
- RFC 6891 — Extension Mechanisms for DNS (EDNS(0))
- RFC 3225 — Indicating Resolver Support of DNSSEC (DO bit)
Acceptance Criteria
Related Issues
Overview
Implement EDNS(0) (Extension Mechanisms for DNS) support as defined in RFC 6891. This is a prerequisite for DNSSEC support (#2) and enables larger UDP payloads and extended flags.
Parent Issue
Background
EDNS(0) extends DNS by adding a pseudo-record (OPT, type 41) to the Additional section. Key capabilities:
Coordination
This work overlaps with #29 (Performance Tuning) since both involve buffer management:
Span<T>andMemory<T>for parsingArrayPool<byte>for buffer allocationImplementation Tasks
OPT Record Parsing
OptRDataclass inDns/RData.csResourceList.LoadFrom()whenType == ResourceType.OPTOPT Record Serialization
OptRData.WriteToStream()DnsMessage Integration
EdnsOptionsproperty toDnsMessagefor convenient accessHasEdns(),GetMaxUdpPayload(),IsDnssecOk()Buffer Management
appsettings.jsonArrayPool<byte>.Sharedfor buffer reuse (coordinate with Tune serving loop for performance and minimal memory utilization #29)Configuration
AppConfig.cs:Testing
Technical References
Acceptance Criteria
Related Issues