# HG changeset patch # User Kim Alvefur # Date 1643821128 -3600 # Node ID dd15f42f6312f52c2ff588b17b6919063a17bb39 # Parent ffd66b461f6a825a95f4533815c48d5425d1d1c3 util.dns: Minor updates of SVCB parser Now based on draft-ietf-dnsop-svcb-https-08 diff -r ffd66b461f6a -r dd15f42f6312 util/dns.lua --- a/util/dns.lua Sun Oct 04 21:29:44 2020 +0200 +++ b/util/dns.lua Wed Feb 02 17:58:48 2022 +0100 @@ -198,7 +198,7 @@ }, 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 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;