erldns_edns_ede (erldns v10.5.4)

View Source

Add Extended DNS Error (EDE) options to DNS responses.

This pipeline handler implements RFC 8914 Extended DNS Errors, which provides additional error information in DNS responses through EDNS0 options. This helps clients better understand why a query failed or why a particular response was returned.

Configuration

The handler can be configured through application configuration:

{erldns, [
    {packet_pipeline, [
        ...,
        erldns_edns_ede,
        ...
    ]},
    {edns_ede, #{
        enabled => true, %% Enable/disable EDE support (default: true)
        add_text => true %% Include EXTRA-TEXT in EDE (default: false)
    }
]}

Behavior

This handler examines the DNS response and adds appropriate EDE options based on:

  • Response code (SERVFAIL, REFUSED, FORMERR, etc.)
  • DNSSEC validation failures
  • Resolver errors stored in options

EDE codes are only added for error responses (SERVFAIL, REFUSED, FORMERR). Valid negative responses like NXDOMAIN do not include EDE codes.

The handler automatically creates an OPT RR if one doesn't exist and appends EDE options to existing OPT RR.

References

Summary

Functions

call/2

erldns_pipeline:call/2 callback.

prepare(Opts)

erldns_pipeline:prepare/1 callback.