]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: dns: dns_nameserver structure update: new counter for truncated response
authorBaptiste Assmann <bedis9@gmail.com>
Wed, 2 Sep 2015 19:56:05 +0000 (21:56 +0200)
committerWilly Tarreau <w@1wt.eu>
Tue, 8 Sep 2015 12:57:28 +0000 (14:57 +0200)
This patch updates the dns_nameserver structure to integrate a counter
dedicated to 'truncated' response sent by servers.
Such response are important to track, since HAProxy is supposed to
replay its request.

include/types/dns.h
src/dumpstats.c

index 589bb5dfd9661ef8c2862a65a5f56d895869f1a1..ba35c7160b9977d3857e4f9e20b0c761541ba973 100644 (file)
@@ -136,6 +136,7 @@ struct dns_nameserver {
                long int invalid;       /* - malformed DNS response */
                long int too_big;       /* - too big response */
                long int outdated;      /* - outdated response (server slower than the other ones) */
+               long int truncated;     /* - truncated response */
        } counters;
 };
 
index 01fe53ba4590c62ceab9edd34cc6f1dd41dcdabe..92f2dead5bc72e0af60d4a3b839095bd13e580b4 100644 (file)
@@ -6266,6 +6266,7 @@ static int stats_dump_resolvers_to_buffer(struct stream_interface *si)
                        chunk_appendf(&trash, "  other: %ld\n", pnameserver->counters.other);
                        chunk_appendf(&trash, "  invalid: %ld\n", pnameserver->counters.invalid);
                        chunk_appendf(&trash, "  too_big: %ld\n", pnameserver->counters.too_big);
+                       chunk_appendf(&trash, "  truncated: %ld\n", pnameserver->counters.truncated);
                        chunk_appendf(&trash, "  outdated: %ld\n", pnameserver->counters.outdated);
                }