0

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.
Adam
  • 4,590
  • 10
  • 51
  • 84
  • And what is your question? At worst if your current library does not support TSIG records and you have no way to let it resume, then filter out TSIG records out of the zonefile before giving it to your parsing library. Or fix the library if you have its sources. – Patrick Mevzek Mar 25 '19 at 15:54
  • DNSJava is pretty popular. I'm just surprised no one else has run into this. I see TSIG java files in the library. I just ended up handling the exceptions myself. – Adam Mar 27 '19 at 01:49
  • TSIG records are seldom used... – Patrick Mevzek Mar 27 '19 at 01:56

1 Answers1

0

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

Kenny Ingle
  • 115
  • 6