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>
This commit is contained in:
parent
971cd82b41
commit
785792a591
1 changed files with 1 additions and 3 deletions
|
@ -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];
|
||||
|
|
Loading…
Reference in a new issue