Add missing RR type numbers to ns_type

Message ID 1471380762.2531.3.camel@redhat.com
State New, archived
Headers

Commit Message

Nathaniel McCallum Aug. 16, 2016, 8:52 p.m. UTC
  
  

Comments

Florian Weimer Aug. 17, 2016, 8:52 a.m. UTC | #1
On 08/16/2016 10:52 PM, Nathaniel McCallum wrote:
> From a53a3428ee7c2c1dc3e3ff7e682e87f6694d9a55 Mon Sep 17 00:00:00 2001
> From: Nathaniel McCallum <npmccallum@redhat.com>
> Date: Tue, 16 Aug 2016 16:43:29 -0400
> Subject: [PATCH] Add missing RR type numbers to ns_type
>
> The ns_type enumeration was missing quite a few resource records. This
> patch updates the enumeration to reflect the current state of the IANA
> DNS Parameters registry.
>
>     http://www.iana.org/assignments/dns-parameters/dns-parameters.xhtml

The problem with <arpa/nameser.h> is that it is stuck in the past.  It 
was never updated for DNSSECbis (which is incompatible with the original 
DNSSEC).  And there are declarations in it which do not have 
implementations in glibc.

I was leaning towards deprecating the header and eventually removing it. 
  What kind of use do you see for it?

Thanks,
Florian
  
Petr Spacek Aug. 17, 2016, 11:02 a.m. UTC | #2
On 17.8.2016 10:52, Florian Weimer wrote:
> On 08/16/2016 10:52 PM, Nathaniel McCallum wrote:
>> From a53a3428ee7c2c1dc3e3ff7e682e87f6694d9a55 Mon Sep 17 00:00:00 2001
>> From: Nathaniel McCallum <npmccallum@redhat.com>
>> Date: Tue, 16 Aug 2016 16:43:29 -0400
>> Subject: [PATCH] Add missing RR type numbers to ns_type
>>
>> The ns_type enumeration was missing quite a few resource records. This
>> patch updates the enumeration to reflect the current state of the IANA
>> DNS Parameters registry.
>>
>>     http://www.iana.org/assignments/dns-parameters/dns-parameters.xhtml
> 
> The problem with <arpa/nameser.h> is that it is stuck in the past.  It was
> never updated for DNSSECbis (which is incompatible with the original DNSSEC). 
> And there are declarations in it which do not have implementations in glibc.
> 
> I was leaning towards deprecating the header and eventually removing it.  What
> kind of use do you see for it?

I second that. If a user is serious about DNS(SEC), he should be using
something else than the ages-old resolv library shipped with libc. The more we
remove from libc the better as it would encourage people to use some
currently-developed library which is up to the latest standards.
  
Nathaniel McCallum Aug. 17, 2016, 12:57 p.m. UTC | #3
On Wed, 2016-08-17 at 10:52 +0200, Florian Weimer wrote:
> On 08/16/2016 10:52 PM, Nathaniel McCallum wrote:
> > 
> > From a53a3428ee7c2c1dc3e3ff7e682e87f6694d9a55 Mon Sep 17 00:00:00
> > 2001
> > From: Nathaniel McCallum <npmccallum@redhat.com>
> > Date: Tue, 16 Aug 2016 16:43:29 -0400
> > Subject: [PATCH] Add missing RR type numbers to ns_type
> > 
> > The ns_type enumeration was missing quite a few resource records.
> > This
> > patch updates the enumeration to reflect the current state of the
> > IANA
> > DNS Parameters registry.
> > 
> >     http://www.iana.org/assignments/dns-parameters/dns-parameters.x
> > html
> 
> The problem with <arpa/nameser.h> is that it is stuck in the
> past.  It 
> was never updated for DNSSECbis (which is incompatible with the
> original 
> DNSSEC).  And there are declarations in it which do not have 
> implementations in glibc.
> 
> I was leaning towards deprecating the header and eventually removing
> it. 
>   What kind of use do you see for it?

I'm fine with that. So long as you are on the record, I can use this
conversation to discourage the use of this header in projects that
object to RR types that aren't in the enum.

Nathaniel
  
Florian Weimer Sept. 9, 2016, 11:45 a.m. UTC | #4
On 08/17/2016 02:57 PM, Nathaniel McCallum wrote:
> On Wed, 2016-08-17 at 10:52 +0200, Florian Weimer wrote:
>> On 08/16/2016 10:52 PM, Nathaniel McCallum wrote:
>>>
>>> From a53a3428ee7c2c1dc3e3ff7e682e87f6694d9a55 Mon Sep 17 00:00:00
>>> 2001
>>> From: Nathaniel McCallum <npmccallum@redhat.com>
>>> Date: Tue, 16 Aug 2016 16:43:29 -0400
>>> Subject: [PATCH] Add missing RR type numbers to ns_type
>>>
>>> The ns_type enumeration was missing quite a few resource records.
>>> This
>>> patch updates the enumeration to reflect the current state of the
>>> IANA
>>> DNS Parameters registry.
>>>
>>>     http://www.iana.org/assignments/dns-parameters/dns-parameters.x
>>> html
>>
>> The problem with <arpa/nameser.h> is that it is stuck in the
>> past.  It
>> was never updated for DNSSECbis (which is incompatible with the
>> original
>> DNSSEC).  And there are declarations in it which do not have
>> implementations in glibc.
>>
>> I was leaning towards deprecating the header and eventually removing
>> it.
>>   What kind of use do you see for it?
>
> I'm fine with that. So long as you are on the record, I can use this
> conversation to discourage the use of this header in projects that
> object to RR types that aren't in the enum.

I pondered this some more and suggest to remove just the DNSSEC cruft 
from <arpa/nameser.h> and then synchronize with the IANA registry.  The 
header file seems sufficiently widely used so that maintaining it makes 
sense.

I have posted a few patches to clean it up.  Once these patches are in, 
could you rebase your patch on top of it?  I think you also should 
update <arpa/nameser_compat.h> (whose name is a bit of a misnomer, it is 
always included by <arpa/nameser.h>).

Thanks,
Florian
  

Patch

From a53a3428ee7c2c1dc3e3ff7e682e87f6694d9a55 Mon Sep 17 00:00:00 2001
From: Nathaniel McCallum <npmccallum@redhat.com>
Date: Tue, 16 Aug 2016 16:43:29 -0400
Subject: [PATCH] Add missing RR type numbers to ns_type

The ns_type enumeration was missing quite a few resource records. This
patch updates the enumeration to reflect the current state of the IANA
DNS Parameters registry.

    http://www.iana.org/assignments/dns-parameters/dns-parameters.xhtml
---
 ChangeLog             |  4 ++++
 resolv/arpa/nameser.h | 42 ++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 46 insertions(+)

diff --git a/ChangeLog b/ChangeLog
index ae29267..153e585 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@ 
+2016-08-16  Nathaniel McCallum  <npmccallum@redhat.com>
+
+	* resolv/arpa/nameser.h (ns_type): Add missing RR types.
+
 2016-08-16  Joseph Myers  <joseph@codesourcery.com>
 
 	* soft-fp/extended.h [_FP_W_TYPE_SIZE < 64] (FP_UNPACK_RAW_E):
diff --git a/resolv/arpa/nameser.h b/resolv/arpa/nameser.h
index 04f8844..371325e 100644
--- a/resolv/arpa/nameser.h
+++ b/resolv/arpa/nameser.h
@@ -289,6 +289,39 @@  typedef enum __ns_type {
 	ns_t_sink = 40,		/*%< Kitchen sink (experimentatl) */
 	ns_t_opt = 41,		/*%< EDNS0 option (meta-RR) */
 	ns_t_apl = 42,		/*%< Address prefix list (RFC3123) */
+	ns_t_ds = 43,		/*%< Delegation Signer */
+	ns_t_sshfp = 44,	/*%< SSH Key Fingerprint */
+	ns_t_ipseckey = 45,	/*%< IPSECKEY */
+	ns_t_rrsig = 46,	/*%< RRSIG */
+	ns_t_nsec = 47,		/*%< NSEC */
+	ns_t_dnskey = 48,	/*%< DNSKEY */
+	ns_t_dhcid = 49,	/*%< DHCID */
+	ns_t_nsec3 = 50,	/*%< NSEC3 */
+	ns_t_nsec3param = 51,	/*%< NSEC3PARAM */
+	ns_t_tlsa = 52,		/*%< TLSA */
+	ns_t_smimea = 53,	/*%< S/MIME cert association */
+				/*   Unassigned (54) */
+	ns_t_hip = 55,		/*%< Host Identity Protocol */
+	ns_t_ninfo = 56,	/*%< NINFO */
+	ns_t_rkey = 57,		/*%< RKEY */
+	ns_t_talink = 58,	/*%< Trust Anchor LINK */
+	ns_t_cds = 59,		/*%< Child DS */
+	ns_t_cdnskey = 60,	/*%< DNSKEY(s) reflected in DS */
+	ns_t_openpgpkey = 61,	/*%< OpenPGP Key */
+	ns_t_csync = 62,	/*%< Child-To-Parent Synchronization */
+				/*   Unassigned (63-98) */
+	ns_t_spf = 99,		/*%< SPF */
+	ns_t_uinfo = 100,	/*%< UINFO */
+	ns_t_uid = 101,		/*%< UID */
+	ns_t_gid = 102,		/*%< GID */
+	ns_t_unspec = 103,	/*%< UNSPEC */
+	ns_t_nid = 104,		/*%< NID */
+	ns_t_l32 = 105,		/*%< L32 */
+	ns_t_l64 = 106,		/*%< L64 */
+	ns_t_lp = 107,		/*%< LP */
+	ns_t_eui48 = 108,	/*%< EUI48 */
+	ns_t_eui64 = 109,	/*%< EUI64 */
+				/*   Unassigned (110-248) */
 	ns_t_tkey = 249,	/*%< Transaction key */
 	ns_t_tsig = 250,	/*%< Transaction signature. */
 	ns_t_ixfr = 251,	/*%< Incremental zone transfer. */
@@ -297,6 +330,15 @@  typedef enum __ns_type {
 	ns_t_maila = 254,	/*%< Transfer mail agent records. */
 	ns_t_any = 255,		/*%< Wildcard match. */
 	ns_t_zxfr = 256,	/*%< BIND-specific, nonstandard. */
+	ns_t_uri = 256,		/*%< URI record, standard. */
+	ns_t_caa = 257,		/*%< Certification Authority Restriction */
+	ns_t_avc = 258,		/*%< Application Visibility and Control */
+				/*   Unassigned (259-32767) */
+	ns_t_ta = 32768,	/*%< DNSSEC Trust Authorities */
+	ns_t_dlv = 32769,	/*%< DNSSEC Lookaside Validation */
+				/*   Unassigned (32770-65279) */
+				/*   Private Use (65280-65534) */
+				/*   Reserved (65535) */
 	ns_t_max = 65536
 } ns_type;
 
-- 
2.9.2