From 6b0ce7d29fac9df84ed34aa2d4634e754aec750d Mon Sep 17 00:00:00 2001 From: Andreas Gustafsson Date: Tue, 19 Sep 2000 01:27:22 +0000 Subject: [PATCH] 474. [bug] The mnemonic of the CHAOS class is CH according to RFC1035, but it was printed and read only as CHAOS. We now accept both forms as input, and print it as CH. --- CHANGES | 5 +++++ lib/dns/rdata.c | 10 ++++++++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/CHANGES b/CHANGES index 9f27d10cc8..2d52a53a1a 100644 --- a/CHANGES +++ b/CHANGES @@ -1,4 +1,9 @@ + 474. [bug] The mnemonic of the CHAOS class is CH according to + RFC1035, but it was printed and read only as CHAOS. + We now accept both forms as input, and print it + as CH. + 473. [bug] nsupdate overran the end of the list of name servers when no servers could be reached, typically causing it to print the error message "dns_request_create: diff --git a/lib/dns/rdata.c b/lib/dns/rdata.c index 3f2c100c0a..577b2a8036 100644 --- a/lib/dns/rdata.c +++ b/lib/dns/rdata.c @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: rdata.c,v 1.107 2000/09/06 03:25:22 marka Exp $ */ +/* $Id: rdata.c,v 1.108 2000/09/19 01:27:22 gson Exp $ */ #include #include @@ -950,6 +950,12 @@ dns_rdataclass_fromtext(dns_rdataclass_t *classp, isc_textregion_t *source) { COMPARE("any", META, dns_rdataclass_any); break; case 'c': + /* + * RFC1035 says the mnemonic for the CHAOS class is CH, + * but historical BIND practice is to call it CHAOS. + * We will accept both forms, but only generate CH. + */ + COMPARE("ch", 0, dns_rdataclass_chaos); COMPARE("chaos", 0, dns_rdataclass_chaos); break; case 'h': @@ -979,7 +985,7 @@ dns_rdataclass_totext(dns_rdataclass_t rdclass, isc_buffer_t *target) { case dns_rdataclass_any: return (str_totext("ANY", target)); case dns_rdataclass_chaos: - return (str_totext("CHAOS", target)); + return (str_totext("CH", target)); case dns_rdataclass_hs: return (str_totext("HS", target)); case dns_rdataclass_in: