updated version and copyright

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
This commit is contained in:
2025-12-27 19:35:41 +01:00
parent fe6a2ec75f
commit 1e04ec37c3
3 changed files with 24 additions and 16 deletions

View File

@@ -1,6 +1,11 @@
CHANGELOG
=========
Version 1.2 Changes (2025-12-27):
* migrated to my new Gitea instance
* correctly handle IPv4 or IPv6 addresses to be empty
* added Remote, IPv4 and IPv6 addresses to the debug output
Version 1.1 Changes (2019-08-05):
* Enhancements:
* Added config file support and a sample config file

View File

@@ -5,10 +5,10 @@ Perl CGI-BIN script to handle Dynamic DNS updates through HTTP (e.g. from a
router), updating DNS records through secure DNS update statements to run your
own Dynamic DNS Service.
**Version 1.1**, latest version, documentation and bugtracker available on my
[GitLab instance](https://gitlab.lindenaar.net/scripts/dyndns)
**Version 1.2**, latest version, documentation and bugtracker available on my
[Gitea instance](https://gitea.lindenaar.net/scripts/dyndns)
Copyright (c) 2013 - 2019 Frederik Lindenaar. free for distribution under the
Copyright (c) 2013 - 2025 Frederik Lindenaar. free for distribution under the
GNU License, see [below](#license)

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) =