summaryrefslogtreecommitdiffhomepage
path: root/protocols/luci-proto-wireguard/htdocs/luci-static/resources/protocol
diff options
context:
space:
mode:
authorJo-Philipp Wich <jo@mein.io>2022-12-05 10:34:51 +0100
committerJo-Philipp Wich <jo@mein.io>2022-12-05 10:34:51 +0100
commit785792a5911036910b6caf440b25262fe8d74a0a (patch)
tree53f20425e50e75a10fcd4eddbc238b8bf238a311 /protocols/luci-proto-wireguard/htdocs/luci-static/resources/protocol
parent971cd82b41be43e8c040e788a0fec27923c40423 (diff)
luci-proto-wireguard: fix configuration import
Avoid referencing not existing `peerdns` option during the configuration file import process. Fixes: #6136 Fixes: 2be01cbfcb ("luci-mod-network: restrict peerdns option to protocols that implemenent it") Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Diffstat (limited to 'protocols/luci-proto-wireguard/htdocs/luci-static/resources/protocol')
-rw-r--r--protocols/luci-proto-wireguard/htdocs/luci-static/resources/protocol/wireguard.js4
1 files changed, 1 insertions, 3 deletions
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 068cc7b0c1..1180b202e5 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
@@ -361,10 +361,8 @@ return network.registerProtocol('wireguard', {
s.getOption('listen_port').getUIElement(s.section).setValue(config.interface_listenport || '');
s.getOption('addresses').getUIElement(s.section).setValue(config.interface_address);
- if (config.interface_dns) {
- s.getOption('peerdns').getUIElement(s.section).setValue('0');
+ if (config.interface_dns)
s.getOption('dns').getUIElement(s.section).setValue(config.interface_dns);
- }
for (var i = 0; i < config.peers.length; i++) {
var pconf = config.peers[i];