From: Brian W. <bwe...@xb...> - 2010-09-09 19:00:23
|
On Sep 9, 2010, at 4:30 AM, <Ale...@us...> <Ale...@us...> wrote: > I am seeing an issue where an IXFR using dnsjava's IXFR client will fail if the serial number on the server has rolled over since the last serial on the client. > > So for example, if I am running a DNS server with a serial number for example.com of 4294967295 and then send it an update so that the serial number rolls over to 1. Then I call dnsjava's: > > ZoneTransferIn transfer = ZoneTransferIn.newIXFR( new Name( "example.com" ), 4294967295, true, "127.0.0.1", null); > transfer.run(); > > the transfer fails. > > If I modify ZoneTransferIn.java and change the line in the parseRR method from: > > if (qtype == Type.IXFR && end_serial <= ixfr_serial) { > > to instead be: > > if (qtype == Type.IXFR && (Serial.compare(end_serial, ixfr_serial) <= 0 )) { > > then everything works great and the IXFR completes successfully. Note that I ran into this with the 1.6.4 release, but I did take a look at the code in 2.1.0 and the bug seems to still be there. Let me know if that appears to be a reasonable fix. This fix looks correct. I'll commit it now, but I'm not sure when the next release will be. Thanks! Brian |