+2004-05-14 Bob Halley <halley@dnspython.org>
+
+ * dns/rdata.py (from_text): The masterfile reader did not
+ accept the unknown RR syntax when used with a known RR type.
+
+2004-05-08 Bob Halley <halley@dnspython.org>
+
+ * dns/name.py (from_text): dns.name.from_text() did not raise
+ an exception if a backslash escape ended prematurely.
+
2004-04-09 Bob Halley <halley@dnspython.org>
* dns/zone.py (_MasterReader._rr_line): The masterfile reader
if isinstance(tok, str):
tok = dns.tokenizer.Tokenizer(tok)
cls = get_rdata_class(rdclass, rdtype)
+ if cls != GenericRdata:
+ # peek at first token
+ token = tok.get()
+ tok.unget(token)
+ if token[0] == dns.tokenizer.IDENTIFIER and \
+ token[1] == r'\#':
+ #
+ # Known type using the generic syntax. Extract the
+ # wire form from the generic syntax, and then run
+ # from_wire on it.
+ #
+ rdata = GenericRdata.from_text(rdclass, rdtype, tok, origin,
+ relativize)
+ return from_wire(rdclass, rdtype, rdata.data, 0, len(rdata.data),
+ origin)
return cls.from_text(rdclass, rdtype, tok, origin, relativize)
def from_wire(rdclass, rdtype, wire, current, rdlen, origin = None):
@ivar ungotten_char: The most recently ungotten character, or None.
@type ungotten_char: string
@ivar ungotten_token: The most recently ungotten token, or None.
- @type ungotten_token: string
+ @type ungotten_token: (int, string) token tuple
@ivar multiline: The current multiline level. This value is increased
by one every time a '(' delimiter is read, and decreased by one every time
a ')' delimiter is read.
empty.
@param token: the token to unget
- @type token: string
- @raises UngetBufferFull: there is already an ungotten char
+ @type token: (int, string) token tuple
+ @raises UngetBufferFull: there is already an ungotten token
"""
if not self.ungotten_token is None:
yzWZriO6i2odGWWQVucZqKVsENW91IOW4vqudngPZsY3
GvQ/xVA8/7pyFj6b7Esga60zyGW6LFe9r8n6paHrlG5o
jqf0BaqHT+8= )
+;
+; test known type using unknown RR syntax
+;
+unknown3 A \# 4 7f000002
a.u 300 IN A 73.80.65.49
b.u 300 IN A 73.80.65.49
unknown2 3600 IN TYPE999 \# 8 0a0000010a000001
+unknown3 3600 IN A 127.0.0.2
wks01 3600 IN WKS 10.0.0.1 6 0 1 2 21 23
wks02 3600 IN WKS 10.0.0.1 17 0 1 2 53
wks03 3600 IN WKS 10.0.0.2 6 65535
a.u.example. 300 IN A 73.80.65.49
b.u.example. 300 IN A 73.80.65.49
unknown2.example. 3600 IN TYPE999 \# 8 0a0000010a000001
+unknown3.example. 3600 IN A 127.0.0.2
wks01.example. 3600 IN WKS 10.0.0.1 6 0 1 2 21 23
wks02.example. 3600 IN WKS 10.0.0.1 17 0 1 2 53
wks03.example. 3600 IN WKS 10.0.0.2 6 65535