forward_types() and reverse_types() conflicts with RFC 2317

Started by monachus, September 10, 2009, 05:48:50 AM

Previous topic - Next topic

monachus

It's not really a bug, but more of a discussion item based on something I encountered yesterday.  Most ISPs will follow RFC 2317 for classless in-addr.arpa delegation, and if they follow it according to Section 4, NicTool works great.  If, however, they follow the alternative method in Section 5.2, it won't work.  NicTool tries to be helpful by limiting forward zones to forward record types and reverse zones to reverse record types.  However, for RFC 2317 5.2 to work, we have to put the PTR records in a forward zone, which NicTool won't allow.

I understand (and like) the helpfulness, but I had to patch my source with the following to get the PTRs in the forward domain in order to do in-addr.arpa delegation with Cogent.  Perhaps the helpfulness could be a configuration option, or even applicable by zone? 

Here's my patch to zone.cgi, which only changes NicTool for forward zones.  There's no reason for anyone to be putting A records into in-addr.arpa zones, so I left that section alone.


--- NicToolClient-2.07/htdocs/zone.cgi.orig 2009-09-10 07:20:34.352386253 -0400
+++ NicToolClient-2.07/htdocs/zone.cgi 2009-09-10 07:21:40.328882375 -0400
@@ -989,8 +989,9 @@
         $type_labels = $nt_obj->rr_reverse_types();
     }
     else {
-        $type_values = [ sort keys %{ $nt_obj->rr_forward_types() } ];
-        $type_labels = $nt_obj->rr_forward_types();
+        my %types = ( %{$nt_obj->rr_forward_types()}, %{$nt_obj->rr_reverse_types()} );
+        $type_values = [ sort keys %types ];
+        $type_labels = \%types;
     }

     #    use Data::Dumper;


Respectfully,

Adrian Goins - President / CEO
Arces Network, LLC

v: +1 212 813 3995 x9201
m: +1 646 621 6547
m: +48 503 057 311
e: agoins@arces.net
w: http://www.arces.net

PGP Key: 1024D/8AADA4B8 2009-04-20
Fingerprint: E3CD 96EA DF3F B345 7ADB  FB74 31EC 9F54 8AAD A4B8
Adrian Goins - President / CEO
Arces Network, LLC
http://www.arces.net

PGP Key: 1024D/8AADA4B8 2009-04-20
Fingerprint: E3CD 96EA DF3F B345 7ADB  FB74 31EC 9F54 8AAD A4B8

matt

Oddly enough, there actually is legit reasons to put A records in reverse zones:

$ dig +short 227.250.223.67.in-addr.arpa.
67.223.250.227
$ dig +short -x 67.223.250.227
227.250.223.67.in-addr.arpa.

That works because I have an A record in the 250.223.67.in-addr.arpa. But I always create those records using the API, because I'm creating one record per IP address. In 'normal' usage, that really doesn't ever happen.

However, I do agree that it should be a configurable option. Perhaps a Javascript option that is user selectable. So, if the zone happens to a a reverse zone (/.in-addr.arpa$/, present the reverse list, but also include an option to select 'see less common record types'.