简体   繁体   中英

DNS Java no text format defined for TSIG

I am using the Master class in the DNS Java library to parse bind zone files. However, when I try to parse the .BIZ zone file from Neustar, I get this error:

org.xbill.DNS.Tokenizer$TokenizerException: 486: no text format defined for TSIG

I would catch this exception and just continue processing entries but the TokenizerException class is not accessible outside the package so I am not able to catch it. I am calling zoneFileRecord.rdataToString() for each record.

Their file contains TSIG entries that look like this:

4h039a453.biz.      3600    IN  NS  ns1.rbe1.g-srv.net.
monitor.reg.neustar.com. 0  ANY TSIG    hmac-md5.sig-alg.reg.int. 1553302104 300 16 YWDHVhM3MpeTglOvyaj5fA== 27955 NOERROR 0 
4h039a453.biz.      3600    IN  NS  ns2.rbe1.g-srv.net.
4h06-ro1eyrm9.biz.  3600    IN  NS  ns1.gm111.parklogic.com.
4h06-ro1eyrm9.biz.  3600    IN  NS  ns2.gm111.parklogic.com.

dnsjava supports TSIG records, but it looks like constructing it from string representation wasn't implemented. There's an issue logged to fix the library: https://github.com/dnsjava/dnsjava/issues/38

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM