]> git.ipfire.org Git - thirdparty/knot-resolver.git/commitdiff
kres: added support for NULL type
authorMarek Vavruša <mvavrusa@cloudflare.com>
Thu, 30 Nov 2017 00:12:45 +0000 (16:12 -0800)
committerMarek Vavruša <mvavrusa@cloudflare.com>
Sat, 2 Dec 2017 02:50:20 +0000 (18:50 -0800)
daemon/lua/kres.lua
tests/config/basic_test.lua

index 9805da4586c5a70a8bfc20eb7d31a0a64bc8e043..c993d0678e742d048b4de6aade32d024537f6b71 100644 (file)
@@ -45,6 +45,7 @@ local const_class = {
        ANY        = 255,
 }
 local const_type = {
+       NULL       =   0,
        A          =   1,
        NS         =   2,
        CNAME      =   5,
index 4dae147d0d65a23e215eedcc4bde3dab12ea3c3a..c0a43f37e2d114e0e2e74fcd121770842b65adf4 100644 (file)
@@ -1,6 +1,7 @@
 -- test if constants work properly
 local function test_constants()
        same(kres.class.IN, 1, 'class constants work')
+       same(kres.type.NULL, 0, 'NULL type works')
        same(kres.type.NS, 2, 'record type constants work')
        same(kres.type.TYPE2, 2, 'unnamed record type constants work')
        same(kres.type.BADTYPE, nil, 'non-existent type constants are checked')