bumped version to 1.2 (minor updates)

- updated documentation to reflect the migration to Gitea
 - correctly handle IPv4 or IPv6 addresses to be empty
 - added Remote, IPv4 and IPv6 addresses to the debug output
 - updated links from Gitlab to Gitea
This commit is contained in:
2026-01-02 12:55:17 +01:00
parent 6251bb5603
commit 467384cbf4
3 changed files with 24 additions and 16 deletions

View File

@@ -3,10 +3,10 @@
#
# dyndns.pl - CGI-BIN script to handle Dynamic DNS updates through http
#
# Version 1.1, latest version, documentation and bugtracker available at:
# https://gitlab.lindenaar.net/scripts/dyndns
# Version 1.2, latest version, documentation and bugtracker available at:
# https://gitea.lindenaar.net/scripts/dyndns
#
# Copyright (c) 2013 - 2019 Frederik Lindenaar
# Copyright (c) 2013 - 2025 Frederik Lindenaar
#
# This script is free software: you can redistribute and/or modify it under the
# terms of version 3 of the GNU General Public License as published by the Free
@@ -207,6 +207,9 @@ sub DNS_Update($$$$$$$) {
my $debugmessage = ($debug)
? "\n\n\n========================================================\n" .
"Remote addr: ". $cgi->remote_addr . "\n".
"IPv4 addr: ". $ipv4 . "\n".
"IPv6 addr: ". $ipv6 . "\n".
$dnsupdate->string . "\n"
: "\n";
@@ -243,12 +246,12 @@ sub handle_update($$$$) {
} else {
# Get ipv4, and ipv6 parameters
my $remote_addr = $cgi->remote_addr;
my $ipv4addr = $cgi->param('ipv4addr') || $cgi->param('ip');
if ($ipv4addr == 'auto') {
my $ipv4addr = $cgi->param('ipv4addr') || $cgi->param('ip') || '';
if ($ipv4addr && $ipv4addr == 'auto') {
$ipv4addr = is_ipv4($remote_addr) ? $remote_addr : undef;
}
my $ipv6addr = $cgi->param('ipv6addr') || $cgi->param('ipv6');
if ($ipv6addr == 'auto') {
my $ipv6addr = $cgi->param('ipv6addr') || $cgi->param('ipv6') || '';
if ($ipv6addr && $ipv6addr == 'auto') {
$ipv6addr = is_ipv6($remote_addr) ? $remote_addr : undef;
}
($statuscode, $statusmessage) =