From 28d875c222d627998553d6f632107771a0d9f55f Mon Sep 17 00:00:00 2001 From: hrzlgnm Date: Thu, 26 Sep 2024 21:26:12 +0200 Subject: [PATCH] Fix logging of cache updates to also check whether the alias has the 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 "ipv4@ipv64.net" or "ipv4@dynv6.com". --- src/cache.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cache.c b/src/cache.c index 0dbd7f0b..ec6dd00f 100644 --- a/src/cache.c +++ b/src/cache.c @@ -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);