summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2020-03-06 08:20:52 +0100
committerErich Eckner <git@eckner.net>2020-03-06 08:20:52 +0100
commit95d93d60ca0c833fc9d65e798fc8e5aed6332bc7 (patch)
tree8ab8dbaf6c53dce057ae39265139edd6c3966fb5
parentf3f2563759e5c8a6c001679c9450ee35cf44b54f (diff)
downloadddns-95d93d60ca0c833fc9d65e798fc8e5aed6332bc7.tar.xz
ddns.php: bugfix - actually use return value
-rw-r--r--ddns.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/ddns.php b/ddns.php
index b9ce90e..6f3b80f 100644
--- a/ddns.php
+++ b/ddns.php
@@ -40,7 +40,7 @@
$lp = array_pop($addrTeile);
$subNet = implode('.', $addrTeile);
array_push($addrTeile, $lp);
- array_reverse($addrTeile);
+ $addrTeile = array_reverse($addrTeile);
if (($subNet == '10.0.2') ||
($subNet == '192.168.0') ||
($subNet == '192.168.1'))
@@ -57,6 +57,7 @@
if (filter_var($addr, FILTER_VALIDATE_IP, FILTER_FLAG_IPV4)) {
$addrTeile = explode('.', $addr);
array_pop($addrTeile);
+ $addrTeile = array_reverse($addrTeile);
return implode('.',$addrTeile).'.in-addr.arpa.';
} elseif (filter_var($addr, FILTER_VALIDATE_IP, FILTER_FLAG_IPV6)) {
$reversed_address = reverse_ipv6_address($addr);