dns/dyndns: fix cloudflare proxy status reset on dyndns update

This prevents resetting of the cloudflare "proxy" status (if this
host is proxied/protected by cloudflare) of the updated DNS record.

(cherry picked from commit c379d66494)
(cherry picked from commit a2b2f8c0a5)
This commit is contained in:
sll552 2017-09-03 17:17:14 +02:00 committed by Franco Fichtner
parent fb0cc1903a
commit 0dd0d50b5c
2 changed files with 3 additions and 2 deletions

View file

@ -1,5 +1,6 @@
PLUGIN_NAME= dyndns
PLUGIN_VERSION= 1.2
PLUGIN_REVISION= 1
PLUGIN_COMMENT= Dynamic DNS Support
PLUGIN_MAINTAINER= franco@opnsense.org

View file

@ -637,8 +637,8 @@ class updatedns {
"content" => "{$this->_dnsIP}",
"type" => "A",
"name" => "{$this->_dnsHost}",
"proxiable" => false,
"proxied" => false
"proxiable" => $output->result[0]->proxiable,
"proxied" => $output->result[0]->proxied
);
$data_json = json_encode($hostData);
$updateHostId = "https://{$dnsServer}/client/v4/zones/{$zone}/dns_records/{$host}";