Software /
code /
prosody
Comparison
tools/dnsregistry.lua @ 12855:3306807c0619
tools/dnsregistry: Fix to ignore unassigned entries
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Fri, 20 Jan 2023 23:39:39 +0100 |
parent | 12271:f31bb79f51d7 |
child | 13142:879a6a33c21b |
comparison
equal
deleted
inserted
replaced
12854:73db76cc6472 | 12855:3306807c0619 |
---|---|
20 local record_name = record:get_child_text("name"); | 20 local record_name = record:get_child_text("name"); |
21 local record_type = record:get_child_text("type"); | 21 local record_type = record:get_child_text("type"); |
22 local record_desc = record:get_child_text("description"); | 22 local record_desc = record:get_child_text("description"); |
23 local record_code = tonumber(record:get_child_text("value")); | 23 local record_code = tonumber(record:get_child_text("value")); |
24 | 24 |
25 if tostring(record):lower():match("reserved") or tostring(record):lower():match("reserved") then | 25 if tostring(record):lower():match("reserved") or tostring(record):lower():match("unassigned") then |
26 record_code = nil; | 26 record_code = nil; |
27 end | 27 end |
28 | 28 |
29 if registry_name == "classes" and record_code then | 29 if registry_name == "classes" and record_code then |
30 record_type = record_desc and record_desc:match("%((%w+)%)$") | 30 record_type = record_desc and record_desc:match("%((%w+)%)$") |