Skip to content

Commit

Permalink
Fix logging of cache updates to also check whether the alias has the …
Browse files Browse the repository at this point in the history
…prefix "ipv6"

The original check, checked whether the alias name contained the
substring "v6". This lead to confusing logging messages for providers
having "v6" in their name. For example in definitions
like "[email protected]" or "[email protected]".
  • Loading branch information
hrzlgnm committed Sep 27, 2024
1 parent 46d2922 commit 28d875c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/cache.c
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ int write_cache_file(ddns_alias_t *alias, const char *name)
cache_file(alias->name, name, path, sizeof(path));
fp = fopen(path, "w");
if (fp) {
if (strstr(name, "v6"))
if (strstr(name, "ipv6") == name)
logit(LOG_NOTICE, "Updating IPv6 cache for %s", alias->name);
else
logit(LOG_NOTICE, "Updating IPv4 cache for %s", alias->name);
Expand Down

0 comments on commit 28d875c

Please sign in to comment.