swap rname and mname in debug output, and handle the USE_CD flag
authoreric <eric@openbsd.org>
Fri, 2 Apr 2021 07:00:30 +0000 (07:00 +0000)
committereric <eric@openbsd.org>
Fri, 2 Apr 2021 07:00:30 +0000 (07:00 +0000)
from Boudewijn Dijkstra

lib/libc/asr/asr_debug.c

index 9fc5857..f9378d1 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: asr_debug.c,v 1.26 2019/07/03 03:24:03 deraadt Exp $  */
+/*     $OpenBSD: asr_debug.c,v 1.27 2021/04/02 07:00:30 eric Exp $     */
 /*
  * Copyright (c) 2012 Eric Faurot <eric@openbsd.org>
  *
@@ -101,8 +101,8 @@ print_rr(const struct asr_dns_rr *rr, char *buf, size_t max)
                break;
        case T_SOA:
                snprintf(buf, max, "%s %s %lu %lu %lu %lu %lu",
-                   print_dname(rr->rr.soa.rname, tmp, sizeof tmp),
-                   print_dname(rr->rr.soa.mname, tmp2, sizeof tmp2),
+                   print_dname(rr->rr.soa.mname, tmp, sizeof tmp),
+                   print_dname(rr->rr.soa.rname, tmp2, sizeof tmp2),
                    (unsigned long)rr->rr.soa.serial,
                    (unsigned long)rr->rr.soa.refresh,
                    (unsigned long)rr->rr.soa.retry,
@@ -285,6 +285,7 @@ _asr_dump_config(FILE *f, struct asr *a)
        PRINTOPT(RES_NOALIASES, "NOALIASES");
        PRINTOPT(RES_USE_EDNS0, "USE_EDNS0");
        PRINTOPT(RES_USE_DNSSEC, "USE_DNSSEC");
+       PRINTOPT(RES_USE_CD, "USE_CD");
        if (o)
                fprintf(f, " 0x%08x", o);
        fprintf(f, "\n");