Skip to content

Commit

Permalink
Fix TR to continue if a DS regex is invalid.
Browse files Browse the repository at this point in the history
  • Loading branch information
rob05c committed Jul 7, 2016
1 parent 6b178d0 commit 4208fa3
Showing 1 changed file with 14 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -619,25 +619,23 @@ private static final Map<String, List<Record>> populateZoneMap(final Map<String,
continue;
}

final Name name = newName(fqdn);
final JSONObject ttl = ds.getTtls();

try {
zholder.add(new ARecord(name,
DClass.IN,
ZoneUtils.getLong(ttl, "A", 60),
c.getIp4()));
} catch (IllegalArgumentException e) {
LOGGER.warn(e + " : " + c.getIp4());
}
final Name name = newName(fqdn);
final JSONObject ttl = ds.getTtls();

final InetAddress ip6 = c.getIp6();
try {
zholder.add(new ARecord(name, DClass.IN, ZoneUtils.getLong(ttl, "A", 60), c.getIp4()));
} catch (IllegalArgumentException e) {
LOGGER.warn(e + " : " + c.getIp4());
}

final InetAddress ip6 = c.getIp6();

if (ip6 != null && ds != null && ds.isIp6RoutingEnabled()) {
zholder.add(new AAAARecord(name,
DClass.IN,
ZoneUtils.getLong(ttl, AAAA, 60),
ip6));
if (ip6 != null && ds != null && ds.isIp6RoutingEnabled()) {
zholder.add(new AAAARecord(name, DClass.IN, ZoneUtils.getLong(ttl, AAAA, 60), ip6));
}
} catch (org.xbill.DNS.TextParseException e) {
LOGGER.error("Caught fatal exception while generating zone data for " + fqdn + "!", e);
}
}
}
Expand Down

0 comments on commit 4208fa3

Please sign in to comment.