luci-proto-wireguard: use ddns lookup_host for peer hints

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>
This commit is contained in:
Jo-Philipp Wich 2023-03-14 23:34:53 +01:00
parent c7df6e7ea5
commit 59a6f062d2

View 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) {