Changeset

12241:dd15f42f6312

util.dns: Minor updates of SVCB parser Now based on draft-ietf-dnsop-svcb-https-08
author Kim Alvefur <zash@zash.se>
date Wed, 02 Feb 2022 17:58:48 +0100
parents 12240:ffd66b461f6a
children 12242:202319a990e7
files util/dns.lua
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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;