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 <jo@mein.io>
This commit is contained in:
parent
5b955f1ae9
commit
e28f9a0491
1 changed files with 5 additions and 1 deletions
|
@ -794,10 +794,14 @@ return network.registerProtocol('wireguard', {
|
||||||
ips.forEach(function(ip) { qro.value(ip) });
|
ips.forEach(function(ip) { qro.value(ip) });
|
||||||
qro.onchange = handleConfigChange;
|
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 = 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.datatype = 'ipaddr';
|
||||||
qro.default = eips;
|
qro.default = eips;
|
||||||
qro.default = dns;
|
|
||||||
eips.forEach(function(eip) { qro.value(eip) });
|
eips.forEach(function(eip) { qro.value(eip) });
|
||||||
qro.onchange = handleConfigChange;
|
qro.onchange = handleConfigChange;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue