private void resolve(Name current, Name suffix) { doneCurrent = false; Name tname = null; if (suffix == null) tname = current; else { try { tname = Name.concatenate(current, suffix); } catch (NameTooLongException e) { nametoolong = true; return; } } lookup(tname); }
private void resolve(Name current, Name suffix) { doneCurrent = false; Name tname = null; if (suffix == null) tname = current; else { try { tname = Name.concatenate(current, suffix); } catch (NameTooLongException e) { nametoolong = true; return; } } lookup(tname); }
private void resolve(Name current, Name suffix) { doneCurrent = false; Name tname = null; if (suffix == null) tname = current; else { try { tname = Name.concatenate(current, suffix); } catch (NameTooLongException e) { nametoolong = true; return; } } lookup(tname); }
private void resolve(Name current, Name suffix) { doneCurrent = false; Name tname = null; if (suffix == null) tname = current; else { try { tname = Name.concatenate(current, suffix); } catch (NameTooLongException e) { nametoolong = true; return; } } lookup(tname); }
private ZoneTransferIn(Name zone, int xfrtype, long serial, boolean fallback, SocketAddress address, TSIG key) { this.address = address; this.tsig = key; if (zone.isAbsolute()) zname = zone; else { try { zname = Name.concatenate(zone, Name.root); } catch (NameTooLongException e) { throw new IllegalArgumentException("ZoneTransferIn: " + "name too long"); } } qtype = xfrtype; dclass = DClass.IN; ixfr_serial = serial; want_fallback = fallback; state = INITIALSOA; }
private ZoneTransferIn(Name zone, int xfrtype, long serial, boolean fallback, SocketAddress address, TSIG key) { this.address = address; this.tsig = key; if (zone.isAbsolute()) zname = zone; else { try { zname = Name.concatenate(zone, Name.root); } catch (NameTooLongException e) { throw new IllegalArgumentException("ZoneTransferIn: " + "name too long"); } } qtype = xfrtype; dclass = DClass.IN; ixfr_serial = serial; want_fallback = fallback; state = INITIALSOA; }
private ZoneTransferIn(Name zone, int xfrtype, long serial, boolean fallback, SocketAddress address, TSIG key) { this.address = address; this.tsig = key; if (zone.isAbsolute()) zname = zone; else { try { zname = Name.concatenate(zone, Name.root); } catch (NameTooLongException e) { throw new IllegalArgumentException("ZoneTransferIn: " + "name too long"); } } qtype = xfrtype; dclass = DClass.IN; ixfr_serial = serial; want_fallback = fallback; state = INITIALSOA; }
private ZoneTransferIn(Name zone, int xfrtype, long serial, boolean fallback, SocketAddress address, TSIG key) { this.address = address; this.tsig = key; if (zone.isAbsolute()) zname = zone; else { try { zname = Name.concatenate(zone, Name.root); } catch (NameTooLongException e) { throw new IllegalArgumentException("ZoneTransferIn: " + "name too long"); } } qtype = xfrtype; dclass = DClass.IN; ixfr_serial = serial; want_fallback = fallback; state = INITIALSOA; }
try absoluteName = Name.concatenate(name, searchPath[i]); if (MulticastDNSService.isMulticastDomain(searchPath[i]))
/** * Create a query to forward to the primary DNS server (if configured). * NOTE: Experimental * * @param query the inbound query. * @return the query to forward to the primary server. * @throws NameTooLongException * @throws TextParseException if query creation fails. */ private Message createPrimaryQuery(Message query) throws NameTooLongException, TextParseException { Name name = query.getQuestion().getName(); if (name.labels() > 0 && name.labels() <= 2) { // short relative or absolute name. this code may not be necessary - // OS resolution utilities probably append the search paths defined // in resolv.conf prior to the lookup int id = query.getHeader().getID(); String queryName = name.getLabelString(0); Name qualifiedName = Name.concatenate(Name.fromString(queryName), Name.fromString(domainName)); LOG.info("Received query {}. Forwarding query {}", name, qualifiedName); Record question = Record.newRecord(qualifiedName, query.getQuestion().getType(), query.getQuestion().getDClass()); query = Message.newQuery(question); query.getHeader().setID(id); } return query; }