]> git.ipfire.org Git - thirdparty/knot-resolver.git/commitdiff
daemon/bindings: assign doh2 kind in net.list()
authorTomas Krizek <tomas.krizek@nic.cz>
Fri, 11 Sep 2020 10:15:32 +0000 (12:15 +0200)
committerTomas Krizek <tomas.krizek@nic.cz>
Tue, 13 Oct 2020 10:55:28 +0000 (12:55 +0200)
daemon/bindings/net.c
daemon/lua/postconfig.lua

index 0d9d65c953c3634053fc6474cf63fd0b13455ed0..b84c095b4e9acc365825493a1d8b533b512fe21d 100644 (file)
@@ -22,6 +22,8 @@ static int net_list_add(const char *key, void *val, void *ext)
 
                if (ep->flags.kind) {
                        lua_pushstring(L, ep->flags.kind);
+               } else if (ep->flags.http && ep->flags.tls) {
+                       lua_pushliteral(L, "doh2");
                } else if (ep->flags.tls) {
                        lua_pushliteral(L, "tls");
                } else {
index 041ae69e4e214dcabe24bea058afc25707458da6..7fff3d1e5cc1b8f157d85e0f71081506c7dd9cc5 100644 (file)
@@ -9,7 +9,10 @@ local function count_sockets()
        for _, socket in ipairs(net.list()) do
                if socket.kind == 'control' then
                        control_socks = control_socks + 1
-               elseif socket.kind == 'dns' or socket.kind == 'tls' or socket.kind == 'doh' then
+               elseif (socket.kind == 'dns' or
+                       socket.kind == 'tls' or
+                       socket.kind == 'doh' or
+                       socket.kind == 'doh2') then
                        dns_socks = dns_socks + 1
                end
        end