Skip to content

Fix for using apex domains with cloudflare DDNS#1072

Merged
fichtner merged 1 commit intoopnsense:masterfrom
cu:fix-cloudflare-ddns-apex-domains
Dec 17, 2018
Merged

Fix for using apex domains with cloudflare DDNS#1072
fichtner merged 1 commit intoopnsense:masterfrom
cu:fix-cloudflare-ddns-apex-domains

Conversation

@cu
Copy link
Copy Markdown
Contributor

@cu cu commented Dec 17, 2018

When refactoring the Cloudflare DDNS code, I removed a bunch of assumptions
but inadvertently added one. The refactored code did not allow for "apex"
domain records, records for which there is no hostname, just the bare
domain. (Traditionally, these have been referred to as '@' records but
with the Cloudflare API, you just hand it the name of the zone.)

Ideally there would be a checkbox or something in the UI for this, or
even better a way to specify the record and zone separately but in lieu of
that, we first try to break the provided string down into hostname and
domain portions and look up the zoneId from that. If that fails, we try
to look up the zondId using the whole string. And then finally fail if
neither return a zone from the API.

Hopefully fixes #926 and possibly the issue reported in #861 although it'

When refactoring the Cloudflare DDNS code, I removed a bunch of assumptions
but inadvertently added one. The refactored code did not allow for "apex"
domain records, records for which there is no hostname, just the bare
domain. (Traditionally, these have been referred to as '@' records but
with the Cloudflare API, you just hand it the name of the zone.)

Ideally there would be a checkbox or something in the UI for this, or
even better a way to specify the record and zone separately but in lieu of
that, we first try to break the provided string down into hostname and
domain portions and look up the zoneId from that. If that fails, we try
to look up the zondId using the whole string. And then finally fail if
neither return a zone from the API.

Hopefully fixes #926 and possibly the issue reported in PR #861.
@fichtner fichtner self-assigned this Dec 17, 2018
@fichtner fichtner merged commit 2b4f2c8 into opnsense:master Dec 17, 2018
@fichtner
Copy link
Copy Markdown
Member

Merged, thanks for working on this!

You can ask for testing on the respective tickets using this command:

# opnsense-patch -c plugins 2b4f2c8

I'll bump the version for the plugin. It should ship in 18.7.10 early in January.

Cheers,
Franco

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

Cloudflare DDNS not retrieving Zone ID

2 participants