Skip to content

cache packet_ttl(): fix wrong TTL in some cases, typically 32768

Vladimír Čunát requested to merge ttl-empty into master

A notable case is when authoritative server incorrectly sends a reply without any record but with EDNS.

For the OPT, the TTL field contains extended-error, EDNS version, DO bit and mandatorily zeroed bits. As extended-error isn't usually set by authoritative servers outside SERVFAIL, and EDNS version is just 1 so far, we'd end up with TTL either 32768 (DO=0) or with a value clamped by maximum TTL (86400 by default).

Merge request reports

Loading