Commit f03364f8 authored by Marek Vavrusa's avatar Marek Vavrusa
Browse files

scripts/tools: updated doc, timers

parent 961a70a0
......@@ -747,6 +747,40 @@ specified worker count and process rank.
Using CLI tools
* ``kresd-host.lua`` - a drop-in replacement for *host(1)* utility
Queries the DNS for information.
The hostname is looked up for IP4, IP6 and mail.
.. code-block:: bash
$ kresd-host.lua -f root.key -v has address (secure) has IPv6 address 2001:1488:0:3::2 (secure) mail is handled by 10 (secure) mail is handled by 20 (secure) mail is handled by 30 (secure)
* ``kresd-query.lua`` - run the daemon in zero-configuration mode, perform a query and execute given callback.
This is useful for executing one-shot queries and hooking into the processing of the result,
for example to check if a domain is managed by a certain registrar or if it's signed.
.. code-block:: bash
$ kresd-query.lua 'assert(kres.dname2str(req:resolved() == "")' && echo "yes"
$ kresd-query.lua -C 'trust_anchors.config("root.keys")' 'assert(req:resolved():hasflag(kres.query.DNSSEC_WANT))'
$ echo $?
.. _`JSON-encoded`:
.. _`Learn Lua in 15 minutes`:
.. _`PowerDNS Recursor`:
......@@ -418,11 +418,15 @@ ffi.metatype( kr_request_t, {
__index = {
current = function(req)
if req.current_query == nil then return nil end
return req.current_query
resolved = function(req)
return C.kr_rplan_resolved(C.kr_resolve_plan(req))
qry = C.kr_rplan_resolved(C.kr_resolve_plan(req))
if qry == nil then return nil end
return qry
push = function(req, qname, qtype, qclass, flags, parent)
......@@ -280,7 +280,7 @@ local trust_anchors = {
trust_anchors.keyset = {}
if trust_anchors.update(new_keys, true) then
if trust_anchors.refresh_ev ~= nil then event.cancel(trust_anchors.refresh_ev) end
refresh_plan(trust_anchors, 5 * sec, active_refresh, true, false)
refresh_plan(trust_anchors, 10 * sec, active_refresh, true, false)
-- Add DS/DNSKEY record(s) (unmanaged)
......@@ -299,4 +299,4 @@ local trust_anchors = {
return trust_anchors
\ No newline at end of file
return trust_anchors
......@@ -12,7 +12,6 @@ Usage: %s [-vdh46D] [-c class] [-t type]
[-f keyfile] hostname
Queries the DNS for information.
The hostname is looked up for IP4, IP6 and mail.
If an ip-address is given a reverse lookup is done.
Use the -v option to see DNSSEC security information.
-t type what type to look for.
-c class what class to look for, if not class IN.
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment