Skip to content

Commit d752596

Browse files
committed
fix(network): judge policy DNS answers by the current policy, not the one that issued them
A policy DNS mapping recorded a contract per endpoint and port, keyed by endpoint position, and was bound to the policy generation it was published in, and its allocation identity hashed the endpoint objects, including the per-reload policy_hash stamp. Any reload refused every kept answer and gave every name a new synthetic address, even when the current policy still allowed the connection. A synthetic address now stands for one name and address family. Its record pins the trusted resolver addresses that passed the destination rules of at least one endpoint eligible for the name, and it is not tied to a policy generation. Each connection is authorized by the current policy as before, and the pinned addresses are filtered through that decision's own destination rules, so an address pinned for another endpoint of the name, another binary's or a looser one, is not reachable through a stricter one. A reload can never add a real address to a kept answer; the TTL still bounds how long it is used, and the name is never resolved again at connect time. The direct Linux transparent path now hydrates the decision's destination plan, with the trusted host gateway policy DNS uses, and filters the pinned addresses through it; it previously dialed the addresses pinned for the matched endpoint without the decision's rules. The port of a connection is decided by the policy alone, so a port added to an endpoint is usable with a kept answer, and a port the policy does not allow is a policy denial that the policy advisor sees as a proposal, like any other denied connection, rather than a mapping refusal. The allocation identity hash, the per-port endpoint contracts and the endpoint join between mappings and decisions are removed. The mapping lookup error the direct path reports for a reload during authorization is renamed PolicyChanged: the store never returns it. Signed-off-by: mr-miles <miles.waller@gmail.com>
1 parent 1041a62 commit d752596

6 files changed

Lines changed: 457 additions & 688 deletions

File tree

0 commit comments

Comments
 (0)