From: Jan Vcelak Date: Sat, 31 Oct 2015 05:42:07 +0000 (+0100) Subject: Add support for CDS record type X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=860c43de92e614cbf941cd905e962261c97cb702;p=thirdparty%2Fdnspython.git Add support for CDS record type --- diff --git a/dns/rdatatype.py b/dns/rdatatype.py index ae6b6ec2..60714064 100644 --- a/dns/rdatatype.py +++ b/dns/rdatatype.py @@ -80,6 +80,7 @@ NSEC3 = 50 NSEC3PARAM = 51 TLSA = 52 HIP = 55 +CDS = 59 SPF = 99 UNSPEC = 103 TKEY = 249 @@ -144,6 +145,7 @@ _by_text = { 'NSEC3PARAM' : NSEC3PARAM, 'TLSA' : TLSA, 'HIP' : HIP, + 'CDS' : CDS, 'SPF' : SPF, 'UNSPEC' : UNSPEC, 'TKEY' : TKEY, diff --git a/dns/rdtypes/ANY/CDS.py b/dns/rdtypes/ANY/CDS.py new file mode 100644 index 00000000..15fe012f --- /dev/null +++ b/dns/rdtypes/ANY/CDS.py @@ -0,0 +1,19 @@ +# Copyright (C) 2003-2007, 2009-2011 Nominum, Inc. +# +# Permission to use, copy, modify, and distribute this software and its +# documentation for any purpose with or without fee is hereby granted, +# provided that the above copyright notice and this permission notice +# appear in all copies. +# +# THE SOFTWARE IS PROVIDED "AS IS" AND NOMINUM DISCLAIMS ALL WARRANTIES +# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL NOMINUM BE LIABLE FOR +# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT +# OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +import dns.rdtypes.dsbase + +class CDS(dns.rdtypes.dsbase.DSBase): + """CDS record""" diff --git a/dns/rdtypes/ANY/__init__.py b/dns/rdtypes/ANY/__init__.py index 721e9dd6..b95048b5 100644 --- a/dns/rdtypes/ANY/__init__.py +++ b/dns/rdtypes/ANY/__init__.py @@ -17,6 +17,7 @@ __all__ = [ 'AFSDB', + 'CDS', 'CERT', 'CNAME', 'DLV', diff --git a/tests/example b/tests/example index 07394ae8..fca0adec 100644 --- a/tests/example +++ b/tests/example @@ -194,6 +194,7 @@ wks03 WKS 10.0.0.2 6 ( 65535 ) x2501 X25 "123456789" dlv01 DLV 12345 3 1 123456789abcdef67890123456789abcdef67890 ds01 DS 12345 3 1 123456789abcdef67890123456789abcdef67890 +cds01 CDS 12345 3 1 123456789abcdef67890123456789abcdef67890 apl01 APL 1:192.168.32.0/21 !1:192.168.38.0/28 apl02 APL 1:224.0.0.0/4 2:FF00:0:0:0:0:0:0:0/8 unknown2 TYPE999 \# 8 0a0000010a000001 diff --git a/tests/example1.good b/tests/example1.good index 62e8e287..1e96be8f 100644 --- a/tests/example1.good +++ b/tests/example1.good @@ -20,6 +20,7 @@ caa03 3600 IN CAA 0 iodef "http://iodef.example.com/" caa04 3600 IN CAA 0 issue "ca.example.net; account=230123" caa05 3600 IN CAA 0 issue "ca.example.net; policy=ev" caa06 3600 IN CAA 128 tbs "Unknown" +cds01 3600 IN CDS 12345 3 1 123456789abcdef67890123456789abcdef67890 cert01 3600 IN CERT 65534 65535 PRIVATEOID MxFcby9k/yvedMfQgKzhH5er0Mu/vILz 45IkskceFGgiWCn/GxHhai6VAuHAoNUz 4YoU1tVfSCSqQYn6//11U6Nld80jEeC8 aTrO+KKmCaY= cname01 3600 IN CNAME cname-target. cname02 3600 IN CNAME cname-target diff --git a/tests/example2.good b/tests/example2.good index 4a920125..5895179b 100644 --- a/tests/example2.good +++ b/tests/example2.good @@ -20,6 +20,7 @@ caa03.example. 3600 IN CAA 0 iodef "http://iodef.example.com/" caa04.example. 3600 IN CAA 0 issue "ca.example.net; account=230123" caa05.example. 3600 IN CAA 0 issue "ca.example.net; policy=ev" caa06.example. 3600 IN CAA 128 tbs "Unknown" +cds01.example. 3600 IN CDS 12345 3 1 123456789abcdef67890123456789abcdef67890 cert01.example. 3600 IN CERT 65534 65535 PRIVATEOID MxFcby9k/yvedMfQgKzhH5er0Mu/vILz 45IkskceFGgiWCn/GxHhai6VAuHAoNUz 4YoU1tVfSCSqQYn6//11U6Nld80jEeC8 aTrO+KKmCaY= cname01.example. 3600 IN CNAME cname-target. cname02.example. 3600 IN CNAME cname-target.example. diff --git a/tests/example3.good b/tests/example3.good index 62e8e287..1e96be8f 100644 --- a/tests/example3.good +++ b/tests/example3.good @@ -20,6 +20,7 @@ caa03 3600 IN CAA 0 iodef "http://iodef.example.com/" caa04 3600 IN CAA 0 issue "ca.example.net; account=230123" caa05 3600 IN CAA 0 issue "ca.example.net; policy=ev" caa06 3600 IN CAA 128 tbs "Unknown" +cds01 3600 IN CDS 12345 3 1 123456789abcdef67890123456789abcdef67890 cert01 3600 IN CERT 65534 65535 PRIVATEOID MxFcby9k/yvedMfQgKzhH5er0Mu/vILz 45IkskceFGgiWCn/GxHhai6VAuHAoNUz 4YoU1tVfSCSqQYn6//11U6Nld80jEeC8 aTrO+KKmCaY= cname01 3600 IN CNAME cname-target. cname02 3600 IN CNAME cname-target