Navigation


Minor bug in EagleDNS

sapao

Member since: 2011-10-12 17:33

Added: 2011-10-12 17:40

Hello,

I m using EagleDNS as part of a project (which I will disclose after I have some running code) and found a minor bug. Here is an Eclipse-generated patch for it:

 

Index: src/se/unlogic/eagledns/EagleDNS.java =================================================================== --- src/se/unlogic/eagledns/EagleDNS.java (revision 149) +++ src/se/unlogic/eagledns/EagleDNS.java (working copy) @@ -138,7 +138,7 @@ List addresses = new ArrayList(); List addressStrings = configFile.getStrings("/Config/System/Address"); - if (addressStrings.isEmpty()) { + if (addressStrings == null || addressStrings.isEmpty()) { log.debug("No addresses found in config, listening on all addresses (0.0.0.0)"); addresses.add(Address.getByAddress("0.0.0.0"));

Best Regards,

Lucas

sapao

Member since: 2011-10-12 17:33

Added: 2011-10-12 17:40

The patch with better formatting:

 

Index: src/se/unlogic/eagledns/EagleDNS.java

===================================================================

--- src/se/unlogic/eagledns/EagleDNS.java (revision 149)

+++ src/se/unlogic/eagledns/EagleDNS.java (working copy)

@@ -138,7 +138,7 @@

  List<InetAddress> addresses = new ArrayList<InetAddress>();

  List<String> addressStrings = configFile.getStrings("/Config/System/Address");

 

- if (addressStrings.isEmpty()) {

+ if (addressStrings == null || addressStrings.isEmpty()) {

 

  log.debug("No addresses found in config, listening on all addresses (0.0.0.0)");

  addresses.add(Address.getByAddress("0.0.0.0"));

Unlogic

Member since: 2008-01-27 20:43

Added: 2011-10-17 09:06

Thank you sapao!

I've commited your patch along with a fix for another null pointer in AuthoritativeResolver. I'll make a new release of EagleDNS later today.

Btw. Good luck with your project, I'm looking forward to the disclosure!

 

Unlogic

Member since: 2008-01-27 20:43

Added: 2011-10-17 11:17

This bug has now been fixed in release 1.1.2. The release should announced on Freshmeat.net shortly.