improve dyndns

This commit is contained in:
_Bastler 2023-12-14 10:13:57 +01:00
parent f6a1d3cb57
commit 4b819f1d08

View File

@ -85,7 +85,7 @@ public class DyndnsController extends BaseController {
try {
Name zone = Name.fromString("we.bstly.de.");
Name host = Name.fromString(name, zone);
Name host = Name.fromString(name.toLowerCase(), zone);
Update update = new Update(zone);
if (ip.isPresent()) {
update.replace(host, Type.A, 300, ip.get());
@ -104,7 +104,7 @@ public class DyndnsController extends BaseController {
Message response = res.send(update);
logger.debug("\nDynDNS for " + name + "with\nIP:\t" + ip.orElse("-") + "\nIPV6:\t" + ipv6.orElse("-") + "\n\n" +
logger.debug("\nDynDNS for '" + name + "' with\nIP:\t" + ip.orElse("-") + "\nIPV6:\t" + ipv6.orElse("-") + "\n\n" +
response.toString());
} catch (Exception e) {
e.printStackTrace();