luci-proto-wireguard: use ddns lookup_host for peer hints
authorJo-Philipp Wich <jo@mein.io>
Tue, 14 Mar 2023 22:34:53 +0000 (23:34 +0100)
committerJo-Philipp Wich <jo@mein.io>
Tue, 14 Mar 2023 22:36:39 +0000 (23:36 +0100)
The `domain` option of a DDNS service entry may contain non-hostname values,
use the `lookup_hostname` option instead.

Fixes: #6289
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
protocols/luci-proto-wireguard/htdocs/luci-static/resources/protocol/wireguard.js

index 1180b202e5a34953ae87802400cb5c74e931500d..2126403de6b6cfee4661e332a63aba6487fc6dde 100644 (file)
@@ -730,8 +730,8 @@ return network.registerProtocol('wireguard', {
                                var hostnames = [];
 
                                uci.sections('ddns', 'service', function(s) {
-                                       if (typeof(s.domain) == 'string' && s.enabled == '1')
-                                               hostnames.push(s.domain);
+                                       if (typeof(s.lookup_host) == 'string' && s.enabled == '1')
+                                               hostnames.push(s.lookup_host);
                                });
 
                                uci.sections('system', 'system', function(s) {