aboutsummaryrefslogtreecommitdiffstats
path: root/util/dns.lua
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2022-02-02 17:58:48 +0100
committerKim Alvefur <zash@zash.se>2022-02-02 17:58:48 +0100
commitda53d0fc75dcd9314f9bf9854a8a75b398008527 (patch)
tree3a74ead9b6efb178d6f922a02682185fc0322de8 /util/dns.lua
parentb657d2ab26259909d97a055a0ddba5f2f6f85d24 (diff)
downloadprosody-da53d0fc75dcd9314f9bf9854a8a75b398008527.tar.gz
prosody-da53d0fc75dcd9314f9bf9854a8a75b398008527.zip
util.dns: Minor updates of SVCB parser
Now based on draft-ietf-dnsop-svcb-https-08
Diffstat (limited to 'util/dns.lua')
-rw-r--r--util/dns.lua3
1 files changed, 2 insertions, 1 deletions
diff --git a/util/dns.lua b/util/dns.lua
index 851f480e..81e20971 100644
--- a/util/dns.lua
+++ b/util/dns.lua
@@ -198,7 +198,7 @@ function parsers.TLSA(packet)
}, tlsa_mt);
end
-local svcb_params = {"alpn"; "no-default-alpn"; "port"; "ipv4hint"; "echconfig"; "ipv6hint"};
+local svcb_params = {"alpn"; "no-default-alpn"; "port"; "ipv4hint"; "ech"; "ipv6hint"};
setmetatable(svcb_params, {__index = function(_, n) return "key" .. tostring(n); end});
local svcb_mt = {
@@ -206,6 +206,7 @@ local svcb_mt = {
local kv = {};
for i = 1, #rr.fields do
t_insert(kv, s_format("%s=%q", svcb_params[rr.fields[i].key], tostring(rr.fields[i].value)));
+ -- FIXME the =value part may be omitted when the value is "empty"
end
return s_format("%d %s %s", rr.prio, rr.name, t_concat(kv, " "));
end;