From 270b7373c12e96742cfc9000456074c620ada6e2 Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Fri, 16 Feb 2024 16:17:26 +0100 Subject: [PATCH] luci-proto-wireguard: fix broken DNS option in peer config generator The config generation code was referencing a not existing `dns_servers` input field. Fixes: #6921 Fixes: 5b26887c52 ("Adding a DNS option to the wireguard peer config ...") Signed-off-by: Jo-Philipp Wich (cherry picked from commit e28f9a0491f5f50a70bbefb1720ff8241f456f83) --- .../htdocs/luci-static/resources/protocol/wireguard.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/protocols/luci-proto-wireguard/htdocs/luci-static/resources/protocol/wireguard.js b/protocols/luci-proto-wireguard/htdocs/luci-static/resources/protocol/wireguard.js index 72885f094c..8297a3723f 100644 --- a/protocols/luci-proto-wireguard/htdocs/luci-static/resources/protocol/wireguard.js +++ b/protocols/luci-proto-wireguard/htdocs/luci-static/resources/protocol/wireguard.js @@ -791,10 +791,14 @@ return network.registerProtocol('wireguard', { ips.forEach(function(ip) { qro.value(ip) }); qro.onchange = handleConfigChange; + qro = qrs.option(form.DynamicList, 'dns_servers', _('DNS Servers'), _('DNS servers for the remote clients using this tunnel to your openwrt device. Some wireguard clients require this to be set.')); + qro.datatype = 'ipaddr'; + qro.default = dns; + qro.onchange = handleConfigChange; + qro = qrs.option(form.DynamicList, 'addresses', _('Addresses'), _('IP addresses for the peer to use inside the tunnel. Some clients require this setting.')); qro.datatype = 'ipaddr'; qro.default = eips; - qro.default = dns; eips.forEach(function(eip) { qro.value(eip) }); qro.onchange = handleConfigChange; -- 2.30.2