* [PATCH] <arpa/nameser.h>: Remove RR type classification macros [BZ #20592]
@ 2016-09-09 11:43 Florian Weimer
2016-09-20 7:06 ` Petr Spacek
0 siblings, 1 reply; 3+ messages in thread
From: Florian Weimer @ 2016-09-09 11:43 UTC (permalink / raw)
To: libc-alpha
The macros are no longer up-to-date, and the classification is not
useful. In this particular case, removal without prior deprecation
seems the right approach.
2016-09-09 Florian Weimer <fweimer@redhat.com>
[BZ #20592]
Remove RR type classification macros.
* resolv/arpa/nameser.h (ns_t_qt_p, ns_t_mrr_p, ns_t_rr_p)
(ns_t_udp_p, ns_t_xfr_p): Remove.
diff --git a/NEWS b/NEWS
index 5566125..a98ca3c 100644
--- a/NEWS
+++ b/NEWS
@@ -46,6 +46,12 @@ Version 2.25
only implemented minimal support for the previous version of DNSSEC, which
is incompatible with the currently deployed version.
+* The resource record type classification macros ns_t_qt_p, ns_t_mrr_p,
+ ns_t_rr_p, ns_t_udp_p, ns_t_xfr_p have been removed from the
+ <arpa/nameser.h> header file because the distinction between RR types and
+ meta-RR types is not officially standardized, subject to revision, and
+ thus not suitable for encoding in a macro.
+
Security related changes:
On ARM EABI (32-bit), generating a backtrace for execution contexts which
diff --git a/resolv/arpa/nameser.h b/resolv/arpa/nameser.h
index f11b9f0..a866ce8 100644
--- a/resolv/arpa/nameser.h
+++ b/resolv/arpa/nameser.h
@@ -283,17 +283,6 @@ typedef enum __ns_type {
ns_t_max = 65536
} ns_type;
-/* 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)
-
/*%
* Values for class field
*/
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] <arpa/nameser.h>: Remove RR type classification macros [BZ #20592]
2016-09-09 11:43 [PATCH] <arpa/nameser.h>: Remove RR type classification macros [BZ #20592] Florian Weimer
@ 2016-09-20 7:06 ` Petr Spacek
2016-09-21 15:18 ` Florian Weimer
0 siblings, 1 reply; 3+ messages in thread
From: Petr Spacek @ 2016-09-20 7:06 UTC (permalink / raw)
To: libc-alpha
On 9.9.2016 13:43, Florian Weimer wrote:
> The macros are no longer up-to-date, and the classification is not
> useful. In this particular case, removal without prior deprecation
> seems the right approach.
>
> 2016-09-09 Florian Weimer <fweimer@redhat.com>
>
> [BZ #20592]
> Remove RR type classification macros.
> * resolv/arpa/nameser.h (ns_t_qt_p, ns_t_mrr_p, ns_t_rr_p)
> (ns_t_udp_p, ns_t_xfr_p): Remove.
>
> diff --git a/NEWS b/NEWS
> index 5566125..a98ca3c 100644
> --- a/NEWS
> +++ b/NEWS
> @@ -46,6 +46,12 @@ Version 2.25
> only implemented minimal support for the previous version of DNSSEC, which
> is incompatible with the currently deployed version.
>
> +* The resource record type classification macros ns_t_qt_p, ns_t_mrr_p,
> + ns_t_rr_p, ns_t_udp_p, ns_t_xfr_p have been removed from the
> + <arpa/nameser.h> header file because the distinction between RR types and
> + meta-RR types is not officially standardized, subject to revision, and
> + thus not suitable for encoding in a macro.
> +
> Security related changes:
>
> On ARM EABI (32-bit), generating a backtrace for execution contexts which
> diff --git a/resolv/arpa/nameser.h b/resolv/arpa/nameser.h
> index f11b9f0..a866ce8 100644
> --- a/resolv/arpa/nameser.h
> +++ b/resolv/arpa/nameser.h
> @@ -283,17 +283,6 @@ typedef enum __ns_type {
> ns_t_max = 65536
> } ns_type;
>
> -/* 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)
> -
> /*%
> * Values for class field
> */
It makes sense to me as well (but I did not thoroughly review the code).
--
Petr Spacek @ Red Hat
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] <arpa/nameser.h>: Remove RR type classification macros [BZ #20592]
2016-09-20 7:06 ` Petr Spacek
@ 2016-09-21 15:18 ` Florian Weimer
0 siblings, 0 replies; 3+ messages in thread
From: Florian Weimer @ 2016-09-21 15:18 UTC (permalink / raw)
To: Petr Spacek, libc-alpha
On 09/20/2016 09:06 AM, Petr Spacek wrote:
> It makes sense to me as well (but I did not thoroughly review the code).
Thanks, committed as well.
Florian
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-09-21 15:18 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-09 11:43 [PATCH] <arpa/nameser.h>: Remove RR type classification macros [BZ #20592] Florian Weimer
2016-09-20 7:06 ` Petr Spacek
2016-09-21 15:18 ` Florian Weimer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).