This is the mail archive of the
mailing list for the glibc project.
[Bug network/20592] New: DNS resource record type classification macros in <arpa/nameser.h> are incorrect
- From: "fweimer at redhat dot com" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sourceware dot org
- Date: Fri, 09 Sep 2016 11:13:59 +0000
- Subject: [Bug network/20592] New: DNS resource record type classification macros in <arpa/nameser.h> are incorrect
- Auto-submitted: auto-generated
Bug ID: 20592
Summary: DNS resource record type classification macros in
<arpa/nameser.h> are incorrect
Assignee: unassigned at sourceware dot org
Reporter: fweimer at redhat dot com
Target Milestone: ---
These macros do not reflect reality:
/* Exclusively a QTYPE? (not also an RTYPE) */
#define ns_t_qt_p(t) (ns_t_xfr_p(t) || (t) == ns_t_any || \
(t) == ns_t_mailb || (t) == ns_t_maila)
/* Some kind of meta-RR? (not a QTYPE, but also not an RTYPE) */
#define ns_t_mrr_p(t) ((t) == ns_t_tsig || (t) == ns_t_opt)
/* Exclusively an RTYPE? (not also a QTYPE or a meta-RR) */
#define ns_t_rr_p(t) (!ns_t_qt_p(t) && !ns_t_mrr_p(t))
#define ns_t_udp_p(t) ((t) != ns_t_axfr && (t) != ns_t_zxfr)
#define ns_t_xfr_p(t) ((t) == ns_t_axfr || (t) == ns_t_ixfr || \
(t) == ns_t_zxfr)
Most implementations treat RR types in the range from 128 to 255 as meta-types.
The meta-type concept is ill-defined (OPT and TSIG were allocated from outside
meta-type range, despite being meta-types). It is wrong to hard-code this in a
macros, and the categorization itself is probably not helpful, either.
You are receiving this mail because:
You are on the CC list for the bug.