Zone file parser: records with “.” as owner fail to parse
Consider the following zone file:
. 86400 IN SOA (
a.root-servers.net.
hostmaster.root-servers.net.
2022110200 1800 900 604800 86400
)
. 518400 IN NS a.root-servers.net.
a.root-servers.net. 172800 IN A 198.41.0.4
a.root-servers.net. 172800 IN AAAA 2001:503:ba3e::2:30
When attempting to load it into IBDNS, it fails with the following error:
13:10:06.782 [error] While parsing zones/root.zone, an internal error occurred:
** (MatchError) no match of right hand side value: []
(ibdns 0.1.0) src/ibdns_zone_file_parser.yrl:245: :ibdns_zone_file_parser.make_dname/1
(ibdns 0.1.0) src/ibdns_zone_file_parser.yrl:91: :ibdns_zone_file_parser.yeccpars2_11/7
(ibdns 0.1.0) c:/Program Files/erl-24.1.7/lib/parsetools-2.3.1/include/yeccpre.hrl:57: :ibdns_zone_file_parser.yeccpars0/5
(ibdns 0.1.0) lib/ibdns/zone/file_parser.ex:35: IBDNS.Zone.FileParser.read_from_string/4
(ibdns 0.1.0) lib/ibdns/zone/file_loader.ex:11: IBDNS.Zone.FileLoader.load/3
(ibdns 0.1.0) lib/ibdns/zone/database.ex:21: IBDNS.Zone.Database.add_zone/3
(ibdns 0.1.0) lib/ibdns/server/catalog.ex:111: IBDNS.Server.Catalog.do_add_zone/4
(ibdns 0.1.0) lib/ibdns/server/catalog.ex:66: anonymous fn/2 in IBDNS.Server.Catalog.handle_info/2
13:10:06.782 [error] Could not load zone , class in:
zones/root.zone: internal_error