1
0
mirror of https://github.com/StackExchange/dnscontrol.git synced 2024-05-11 05:55:12 +00:00

Improve MSDNS naptr support (#1165)

* MSDNS: Improve reliability of zone dump

* Update tests

* MSDNS: Add initial NAPTR support

* Update

* fix tests

* fix tests

* Fixing integration tests for NAPTR

* Handle bad JSON. Handle NAPTR TTLs
This commit is contained in:
Tom Limoncelli
2021-06-24 18:26:21 -04:00
committed by GitHub
parent 6d64fc8cac
commit 654736be29
15 changed files with 305 additions and 36 deletions

View File

@ -1,4 +1,6 @@
D("foo.com","none",
NAPTR("@",100,10,"U","E2U+sip","!^.*$!sip:customer-service@example.com!","example"),
NAPTR("@",102,10,"U","E2U+email","!^.*$!mailto:information@example.com!","example")
NAPTR("@",102,10,"U","E2U+email","!^.*$!mailto:information@example.com!","example"),
NAPTR("@",103,10,"U","E2U+email","!^.*$!mailto:information@example.com!",""),
NAPTR("@",104,10,"U","E2U+email","!^.*$!mailto:information@example.com!",".")
);

View File

@ -1,33 +1,53 @@
{
"registrars": [],
"dns_providers": [],
"domains": [
{
"name": "foo.com",
"registrar": "none",
"dnsProviders": {},
"name": "foo.com",
"records": [
{
"type": "NAPTR",
"name": "@",
"target": "example",
"naptrflags": "U",
"naptrorder": 100,
"naptrpreference": 10,
"naptrflags": "U",
"naptrregexp": "!^.*$!sip:customer-service@example.com!",
"naptrservice": "E2U+sip",
"naptrregexp": "!^.*$!sip:customer-service@example.com!"
"target": "example",
"type": "NAPTR"
},
{
"type": "NAPTR",
"name": "@",
"target": "example",
"naptrflags": "U",
"naptrorder": 102,
"naptrpreference": 10,
"naptrflags": "U",
"naptrregexp": "!^.*$!mailto:information@example.com!",
"naptrservice": "E2U+email",
"naptrregexp": "!^.*$!mailto:information@example.com!"
"target": "example",
"type": "NAPTR"
},
{
"name": "@",
"naptrflags": "U",
"naptrorder": 103,
"naptrpreference": 10,
"naptrregexp": "!^.*$!mailto:information@example.com!",
"naptrservice": "E2U+email",
"target": "",
"type": "NAPTR"
},
{
"name": "@",
"naptrflags": "U",
"naptrorder": 104,
"naptrpreference": 10,
"naptrregexp": "!^.*$!mailto:information@example.com!",
"naptrservice": "E2U+email",
"target": ".",
"type": "NAPTR"
}
]
],
"registrar": "none"
}
]
],
"registrars": []
}

View File

@ -1,3 +1,5 @@
$TTL 300
@ IN NAPTR 100 10 "U" "E2U+sip" "!^.*$!sip:customer-service@example.com!" example.foo.com.
IN NAPTR 102 10 "U" "E2U+email" "!^.*$!mailto:information@example.com!" example.foo.com.
@ IN NAPTR 100 10 "U" "E2U+sip" "!^.*$!sip:customer-service@example.com!" example
IN NAPTR 102 10 "U" "E2U+email" "!^.*$!mailto:information@example.com!" example
IN NAPTR 103 10 "U" "E2U+email" "!^.*$!mailto:information@example.com!" .
IN NAPTR 104 10 "U" "E2U+email" "!^.*$!mailto:information@example.com!" .