Skip to content
Snippets Groups Projects
Commit 07ce31f9 authored by Marek Vavruša's avatar Marek Vavruša
Browse files

modules/block: block ANY type example

parent 8d821b20
Branches
Tags
No related merge requests found
......@@ -60,7 +60,7 @@ static inline void lua_pushdname(lua_State *L, const knot_dname_t *name)
X(SSHFP) X(IPSECKEY) X(RRSIG) X(NSEC) X(DNSKEY) X(DHCID) \
X(NSEC3) X(NSEC3PARAM) X(TLSA) X(CDS) X(CDNSKEY) X(SPF) \
X(NID) X(L32) X(L64) X(LP) X(EUI48) X(EUI64) X(TKEY) \
X(TSIG) X(IXFR) X(AXFR)
X(TSIG) X(IXFR) X(AXFR) X(ANY)
static lookup_table_t rrtype_names[] = {
#define X(rc) { KNOT_RRTYPE_ ## rc, #rc },
......@@ -306,4 +306,4 @@ int lib_kres(lua_State *L)
/* Register metatables */
pkt_meta_register(L);
return 1;
}
\ No newline at end of file
}
......@@ -38,6 +38,12 @@ Example configuration
return block.DENY, '224.in-addr.arpa.'
end
end)
-- Disallow ANY queries
block:add(function (pkt, qname)
if pkt:qtype() == kres.rrtype.ANY then
return block.DROP
end
end)
Properties
^^^^^^^^^^
......
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