Outcall
SpecificationsS007 · DNS Filter

Edge cases

S007 Edge Cases

IDScenarioExpected Behavior
S007-EC-001Bridge not up (DNS start)DNS server does not bind. It waits for the bridge-up event. outcall dns status reports inactive (bridge not up).
S007-EC-002All upstream resolvers unreachableoutcalld returns SERVFAIL (RCODE 2) to the container. A warn-level log entry records the failure. The query is not retried automatically.
S007-EC-003Upstream resolver times outoutcalld waits DNS_UPSTREAM_TIMEOUT_MS then tries the next upstream. If all upstreams time out, returns SERVFAIL.
S007-EC-004Malformed DNS queryoutcalld drops the packet silently for UDP. For TCP, it closes the connection. A debug-level log entry records the malformed query.
S007-EC-005Rule engine unavailable (e.g., rules directory missing)outcalld returns SERVFAIL for all queries until the rule engine is available. It MUST NOT silently allow queries when the rule engine cannot evaluate.
S007-EC-006Query for outcalld's own address (bridge gateway IP)Evaluated by the rule engine like any other query. No special-casing.
S007-EC-007Cache full (max entries reached)Evict the least-recently-used entry to make room for the new one. No queries are dropped due to a full cache.
S007-EC-008Port 53 already in useoutcalld logs an error and the DNS filter fails to start. The daemon continues running without DNS filtering. outcall dns status reports the bind failure.
S007-EC-009Hostname exceeds 253 characters (DNS max)outcalld returns FORMERR (RCODE 1). The query is not forwarded to the rule engine.
S007-EC-010Rapid duplicate queries for the same hostnameThe first query is forwarded; concurrent duplicate queries for the same (hostname, record_type) SHOULD coalesce and share the upstream response.
S007-EC-011EDNS0 OPT record in queryoutcalld MUST handle EDNS0 queries. The OPT record is preserved when forwarding to upstream. The advertised UDP buffer size from the client is respected when determining whether to truncate.
S007-EC-012Daemon shutdown while queries are in-flightIn-flight queries get up to 5 seconds to complete. After the grace period, remaining queries are dropped and sockets are closed.
S007-EC-013Upstream returns SERVFAILoutcalld tries the next upstream if available. If all upstreams return SERVFAIL, the SERVFAIL is returned to the container. The response is not cached.
S007-EC-014PTR (reverse DNS) queriesEvaluated by the rule engine with dns.query set to the reverse lookup name (e.g., 1.0.200.10.in-addr.arpa) and dns.record_type set to "PTR". If allowed, forwarded to upstream.
S007-EC-015DNS amplification (query from outside the bridge)The DNS server binds only to the bridge gateway IP. Queries from addresses outside the outcall subnet MUST be dropped.

On this page