]> git.ipfire.org Git - thirdparty/knot-resolver.git/commitdiff
daemon/bindings/net: fix port-based default protocol selection
authorTomas Krizek <tomas.krizek@nic.cz>
Fri, 14 Aug 2020 08:53:43 +0000 (10:53 +0200)
committerTomas Krizek <tomas.krizek@nic.cz>
Tue, 13 Oct 2020 10:55:24 +0000 (12:55 +0200)
daemon/bindings/net.c

index 1e9fbf87e06d1dd0489a063519f33791336c5f48..0d9d65c953c3634053fc6474cf63fd0b13455ed0 100644 (file)
@@ -183,7 +183,10 @@ static int net_listen(lua_State *L)
 
        bool tls = (port == KR_DNS_TLS_PORT);
        bool http = (port == KR_DNS_HTTP_PORT);
-       http = tls = (port == KR_DNS_DOH_PORT);
+       if (port == KR_DNS_DOH_PORT) {
+               http = tls = true;
+       }
+
        bool freebind = false;
        const char *kind = NULL;
        if (n > 2 && !lua_isnil(L, 3)) {