Skip to content

Commit

Permalink
fallback to remote-ip if myip is not set in dyndns request
Browse files Browse the repository at this point in the history
  • Loading branch information
Marcel Hofer committed Feb 21, 2023
1 parent c4badc9 commit 06a18e9
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/updater/request/DynDnsRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ public function autoSetMissingInput(DdnsToken $token, string $remote_ip): void
}
$this->_hostname = rtrim($this->_hostname, '.');

if ($this->getData() === null) {
$this->setData($remote_ip);
}

// match hostname with allowed dns zones
$matching_zones = [];
foreach ($token->getAllowedZones() as $allowed_zone) {
Expand Down

0 comments on commit 06a18e9

Please sign in to comment.