Closed fadenb closed 5 months ago
I've literally just encountered this problem myself (after my IP changed and the DNS did not update; I found that the cfdyndns service had failed).
After some digging, it seems like it's a problem in the cloudflare
crate (of which I could not find any GitHub link of): https://docs.rs/crate/cloudflare/latest/source/src/endpoints/dns.rs
The enum DnsContent
does not have a CAA
record, which causes the parsing of the API response to fail.
I'm really not sure how to fix it, I think we are dependent on upstream fixing the issue (not sure how to report it either; I could not find an issue tracker).
Upon some further inspection, I think it should be possible to go around this problem by adding some parameters to the fetch request: https://github.com/nrdxp/cfdyndns/blob/bd02dd0b8f6689f3bb7a48095bf4fabb50094b5f/src/dns.rs#L178 https://docs.rs/cloudflare/latest/cloudflare/endpoints/dns/struct.ListDnsRecordsParams.html
Feel free to make a PR fixing this if you can, otherwise I should be able to submit one a few days from now.
@fadenb I've submitted a PR to fix this issue, but until it has been accepted you can apply the patch manually as such: https://github.com/diogotcorreia/dotfiles/commit/431e8bc14fec0181ae24e936e5b737da468ae5d7
Let me know if it works for you :)
@diogotcorreia the patch works perfectly. Thank you :)
Hey :wave:,
I have been using cfdyndns for a while on my NixOS systems and it worked without any issues :+1:. Recently, I added a
CAA
record to my zone using the CloudFlare WebUI. Since I added this record of typeCAA
cfdyndns fails with an error:I redacted some fields for privacy reasons.
A quick search on the source code lead me to https://github.com/nrdxp/cfdyndns/blob/bd02dd0b8f6689f3bb7a48095bf4fabb50094b5f/src/dns.rs#L72-L83 I assume extending this would suffice to address this issue. Given sufficient time I might contribute a fix myself though for now I can not tell when that might be the case.