summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Kelley <simon@thekelleys.org.uk>2014-12-17 20:38:20 +0000
committerSimon Kelley <simon@thekelleys.org.uk>2014-12-17 20:38:20 +0000
commit3267804598047bd1781cab91508d1bc516e5ddbb (patch)
tree079473fefcb29f0b280b28a898ae875f8d74676c
parent476693678e778886b64d0b56e27eb7695cbcca99 (diff)
downloaddnsmasq-3267804598047bd1781cab91508d1bc516e5ddbb.tar.gz
Tweak field width in cache dump to avoid truncating IPv6 addresses.v2.73test1
-rw-r--r--debian/changelog2
-rw-r--r--src/cache.c4
2 files changed, 4 insertions, 2 deletions
diff --git a/debian/changelog b/debian/changelog
index 85ce756..5c3d864 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,6 +1,8 @@
dnsmasq (2.73-1) unstable; urgency=low
* New upstream.
+ * Tweak field width in cache dump to avoid truncating IPv6
+ addresses. (closes: #771557)
-- Simon Kelley <simon@thekelleys.org.uk> Fri, 03 Oct 2014 08:49:42 +0000
diff --git a/src/cache.c b/src/cache.c
index 2c3a498..f9e1d31 100644
--- a/src/cache.c
+++ b/src/cache.c
@@ -1411,7 +1411,7 @@ void dump_cache(time_t now)
*a = 0;
if (strlen(n) == 0 && !(cache->flags & F_REVERSE))
n = "<Root>";
- p += sprintf(p, "%-40.40s ", n);
+ p += sprintf(p, "%-30.30s ", n);
if ((cache->flags & F_CNAME) && !is_outdated_cname_pointer(cache))
a = cache_get_cname_target(cache);
#ifdef HAVE_DNSSEC
@@ -1454,7 +1454,7 @@ void dump_cache(time_t now)
else if (cache->flags & F_DNSKEY)
t = "K";
#endif
- p += sprintf(p, "%-30.30s %s%s%s%s%s%s%s%s%s ", a, t,
+ p += sprintf(p, "%-40.40s %s%s%s%s%s%s%s%s%s ", a, t,
cache->flags & F_FORWARD ? "F" : " ",
cache->flags & F_REVERSE ? "R" : " ",
cache->flags & F_IMMORTAL ? "I" : " ",