Commit graph

1297 commits

Author SHA1 Message Date
Richard Hansen
c7c8c5f097 Fix usev4, usev6 output for --query 2024-06-25 01:32:27 -04:00
Richard Hansen
27b50a3b93 Fix --usev4=cisco, --usev4=cisco-asa warning messages 2024-06-25 01:29:29 -04:00
Richard Hansen
e1e8d5711a Fix get_ip argument in --query when testing --fw 2024-06-25 01:20:30 -04:00
Richard Hansen
b363fb48a5 Fix string equality check
The `$proto` interpolation wasn't quoted with `\Q` and `\E`, so
metacharacters in `$proto` could break the matching.  Switch from a
regex to an expression to fix the equality check and improve
readability.
2024-06-25 00:50:22 -04:00
Richard Hansen
61539105bd
Merge pull request #689 from rhansen/readability
Readability improvements
2024-06-22 17:32:27 -04:00
Richard Hansen
1be8438c70 Rename updateable to force_update for readability 2024-06-22 03:07:49 -04:00
Richard Hansen
b426b370fd Rename %cache to %recap for readability 2024-06-22 02:48:03 -04:00
Richard Hansen
49bd1b7347 Rename %services to %protocols for consistency 2024-06-22 02:42:51 -04:00
Richard Hansen
1718ceab70 Add comments documenting the cached variables 2024-06-22 02:35:01 -04:00
Richard Hansen
3d73e7c231 Add TODO comments for confusing bits of code 2024-06-22 02:30:01 -04:00
Richard Hansen
9a5500a667 Improve readability via minor logic tweaks
Change some code that is unnecessarily complicated or otherwise not
the right tool for the job to improve readability.
2024-06-22 02:30:01 -04:00
Richard Hansen
ab60675660 Improve readability of cache var update logic 2024-06-22 02:30:01 -04:00
Richard Hansen
0d712f7bbc Improve readability of wantip, wantipv4, wantipv6 fallback 2024-06-22 02:30:01 -04:00
Richard Hansen
5c38af2ed5 Improve readability by moving code out of unnecessary blocks
Invert conditions and move out unnecessary blocks to reduce
indentation and make it easier to see control flow.
2024-06-22 02:28:12 -04:00
Richard Hansen
160344514f Improve readability by simplifying if conditions 2024-06-22 02:27:44 -04:00
Richard Hansen
288a30ab1e Whitespace fixes 2024-06-22 01:38:28 -04:00
Richard Hansen
afa6db8129
Merge pull request #687 from rhansen/ci
ci: Switch from RedHat UBI to AlmaLinux
2024-06-06 20:22:47 -04:00
Richard Hansen
0c42478ea7 ci: Switch from RedHat UBI to AlmaLinux 2024-06-06 20:16:07 -04:00
Richard Hansen
1ee64537df
Merge pull request #686 from rhansen/header_ok
Minor improvements to `header_ok` utility function
2024-06-06 19:40:44 -04:00
Richard Hansen
2d4a93d5e7 header_ok: Fix typo(?) in HTTP response regular expression 2024-06-06 19:34:06 -04:00
Richard Hansen
211d59fccc header_ok: Log all non-2xx HTTP status codes 2024-06-06 19:34:06 -04:00
Richard Hansen
7fe7fd0e18 header_ok: Refactor for readability 2024-06-06 19:34:06 -04:00
Richard Hansen
adbac91be7 header_ok: Only keep first line of argument
This allows callers to pass the entire response without generating
overly long error messages.
2024-06-06 19:34:06 -04:00
Richard Hansen
b58a10b3e3 header_ok: Add unit tests 2024-06-06 19:34:06 -04:00
Richard Hansen
a486d4f976
Merge pull request #685 from rhansen/module-load
Improve loading of optional SHA1 and JSON modules
2024-06-06 19:10:21 -04:00
Richard Hansen
bb658d763a Simplify loading of JSON::PP 2024-06-06 19:08:15 -04:00
Richard Hansen
1401ff4aea Only attempt to load Digest::SHA
`Digest::SHA` has been a core module for a long time, and
`Digest::SHA1` has not been updated in a long time.
2024-06-06 19:07:25 -04:00
Richard Hansen
1e1e100d7f Prefer Digest::SHA over Digest::SHA1
`Digest::SHA` is a core module; `Digest::SHA1` is not.
2024-06-04 18:44:25 -04:00
Richard Hansen
a0240345bf Use Module->import(...) instead of import(Module, ...)
This matches the documentation of the `use` statement.
2024-06-04 18:44:25 -04:00
Richard Hansen
11be757d54
Merge pull request #683 from rhansen/curl
curl execution improvements
2024-06-03 03:27:15 -04:00
Richard Hansen
1c1642acfd configure.ac: Allow users to specify path to curl 2024-06-03 03:13:05 -04:00
Richard Hansen
31dbd8e4ed geturl: Set raw (binary) mode when reading from curl 2024-06-03 03:13:05 -04:00
Richard Hansen
8e901c3db6 geturl: Avoid the shell when invoking curl 2024-06-02 17:00:05 -04:00
Richard Hansen
09d8d0426e geturl: Don't suppress curl's STDERR
This makes it easier for users to troubleshoot problems.
2024-06-02 17:00:05 -04:00
Richard Hansen
09ce262c82
Merge pull request #674 from jortkoopmans/bugfix/673_Fix_DnsExit_subdomain
Fix DNSExit provider when provided with a zone and a non-identical hostname
2024-06-02 16:58:43 -04:00
jortkoopmans
73a67b728d dnsexit2: Move body of for loop to a separate function
For improved readability.
2024-06-02 16:58:00 -04:00
Richard Hansen
11d0c84639 dnsexit2: Don't skip remaining hosts on connect error or non-2xx
A non-2xx status code might be host-specific, so ddclient should
continue with the next host.  We could skip the remaining hosts if
there is a connection failure, but it doesn't hurt to retry.
2024-06-02 16:58:00 -04:00
jortkoopmans
216741c9ce dnsexit2: Fix when provided with a zone and a non-identical hostname
Trim the zone from the hostname in the request to fix issue.
2024-06-02 16:58:00 -04:00
jortkoopmans
ec2d5f7f69 dnsexit2: Add tests
Needs LWP::UserAgent.
2024-06-02 16:58:00 -04:00
Richard Hansen
282bb01e17 Bump version to v3.12.0~alpha
Enough has changed to warrant a minor revision bump.
2024-06-01 03:49:16 -04:00
Richard Hansen
a0e119c2f2
Merge pull request #681 from rhansen/group_hosts_by
group_hosts_by: Add IPv6 and undef/unset support
2024-06-01 03:09:18 -04:00
Richard Hansen
e60e6e804b group_hosts_by: Use Data::Dumper to make the group signature
This is a bit more robust than manually making the group signature
because it gracefully handles corner cases such as `undef`.
2024-06-01 03:06:06 -04:00
Richard Hansen
f4802fc534 Fix group_hosts_by call for IPv6-enabled services 2024-06-01 03:05:36 -04:00
Richard Hansen
343fcff625 group_hosts_by: Add support for wantipv4, wantipv6 2024-06-01 03:05:36 -04:00
Richard Hansen
ce0a362fd0 group_hosts_by: Add tests 2024-06-01 03:05:26 -04:00
Richard Hansen
ddb04075be
Merge pull request #680 from rhansen/dnsexit2
dnsexit2: Fix parsing of JSON response
2024-05-31 03:27:34 -04:00
Richard Hansen
f976b771d4 dnsexit2: Fix logging of erroneous response body 2024-05-30 18:29:38 -04:00
Richard Hansen
f7f4856b93 dnsexit2: Combine related log messages 2024-05-30 18:28:57 -04:00
Richard Hansen
24a22092ca dnsexit2: Don't croak if JSON decoding fails 2024-05-30 18:22:59 -04:00
Richard Hansen
d28c8ea7ad dnsexit2: Delete unnecessary debug messages 2024-05-30 17:56:51 -04:00