From: Pieter Lexis Date: Tue, 14 Mar 2017 14:31:01 +0000 (+0100) Subject: document SyncRes::doCacheCheck in the dot file X-Git-Tag: rec-4.1.0-alpha1~174^2~18 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=30e9bd9323e32f3bffdde02f71e6ffd2300723f0;p=pdns document SyncRes::doCacheCheck in the dot file --- diff --git a/pdns/recursordist/contrib/syncres.dot b/pdns/recursordist/contrib/syncres.dot index e209a7f82..4ff5d547d 100644 --- a/pdns/recursordist/contrib/syncres.dot +++ b/pdns/recursordist/contrib/syncres.dot @@ -62,6 +62,32 @@ digraph { doResolve_doResolveAt -> doResolve_return_res [label="res >= 0"]; } + subgraph cluster_doCacheCheck { + label="SyncRes::doCacheCheck(const DNSName &qname, const QType &qtype, vector&ret, unsigned int depth, int &res)"; + + doCacheCheck_return_false [label="return false", color=green]; + "Did we have a positive or negative answer?" -> doCacheCheck_return_true [label=yes]; + "Did we have a positive or negative answer?" -> doCacheCheck_return_false [label=no]; + doCacheCheck_return_true [label="return true", color=green]; + + "Allocate return qname, qtype and qttl vars (RVARS) as qname, qtype" -> "Is the last label of qname negatively cached by root and is root-nx-trust enabled?"; + + "Is the last label of qname negatively cached by root and is root-nx-trust enabled?" -> "Set res to NXDOMAIN, set RVARS to to this label|SOA" [label=yes]; + "Is the last label of qname negatively cached by root and is root-nx-trust enabled?" -> "Do we have a negative entry from an auth?" [label=no]; + "Do we have a negative entry from an auth?" -> "Set RCODE (NOERROR or NXDOMAIN), set RVARS to (smaller) qname|SOA" [label=yes]; + "Set RCODE (NOERROR or NXDOMAIN), set RVARS to (smaller) qname|SOA" -> "Add DNSSEC proof from cache"; + "Set res to NXDOMAIN, set RVARS to to this label|SOA" -> "Do we have a positive for RVARS from an auth?"; + + "Do we have a negative entry from an auth?" -> "Do we have a positive for RVARS from an auth?" [label=no]; + + "Do we have a positive for RVARS from an auth?" -> "Did we have a positive or negative answer?" [label=no]; + "Add DNSSEC proof from cache" -> "Do we have a positive for RVARS from an auth?"; + + "Do we have a positive for RVARS from an auth?" -> "Add positive answers to ret if not expired" [label=yes]; + "Add positive answers to ret if not expired" -> "Add DNSSEC data to ret"; + "Add DNSSEC data to ret" -> "Did we have a positive or negative answer?"; + } + subgraph cluster_getBestNSFromCache { label="SyncRes::getBestNSFromCache(const DNSName &qname, const QType& qtype, vector& bestns, bool* flawedNSSet, unsigned int depth, set& beenthere)\nFills the bestns vector with the 'closest' nameservers for qname\nflawedNSSet will be true if the NSSet has no glue.\nbeenthere contains the list of nameservers already visited during this recursion."; diff --git a/pdns/syncres.cc b/pdns/syncres.cc index fd6368094..e8ba86c10 100644 --- a/pdns/syncres.cc +++ b/pdns/syncres.cc @@ -796,6 +796,7 @@ bool SyncRes::doCacheCheck(const DNSName &qname, const QType &qtype, vector