mirror of
https://github.com/kuroppoi/entralinked.git
synced 2026-04-26 08:37:37 -05:00
Revert 90cb874520
Some checks are pending
Build / dist (push) Waiting to run
Some checks are pending
Build / dist (push) Waiting to run
This commit is contained in:
parent
d8bef2f184
commit
f3a5df2ff6
|
|
@ -31,13 +31,14 @@ public class DnsQueryHandler extends SimpleChannelInboundHandler<DatagramDnsQuer
|
||||||
logger.debug("Received {}", question);
|
logger.debug("Received {}", question);
|
||||||
DnsRecordType type = question.type();
|
DnsRecordType type = question.type();
|
||||||
|
|
||||||
|
// We only need type A (32 bit IPv4) for the DS
|
||||||
if(type != DnsRecordType.A) {
|
if(type != DnsRecordType.A) {
|
||||||
logger.warn("Potentially unsupported record type in DNS question: {}", type);
|
logger.warn("Unsupported record type in DNS question: {}", type);
|
||||||
// return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
ByteBuf addressBuffer = Unpooled.wrappedBuffer(hostAddress.getAddress());
|
ByteBuf addressBuffer = Unpooled.wrappedBuffer(hostAddress.getAddress());
|
||||||
DefaultDnsRawRecord answer = new DefaultDnsRawRecord(question.name(), type, 300, addressBuffer);
|
DefaultDnsRawRecord answer = new DefaultDnsRawRecord(question.name(), DnsRecordType.A, 0, addressBuffer);
|
||||||
DatagramDnsResponse response = new DatagramDnsResponse(query.recipient(), query.sender(), query.id());
|
DatagramDnsResponse response = new DatagramDnsResponse(query.recipient(), query.sender(), query.id());
|
||||||
response.addRecord(DnsSection.ANSWER, answer);
|
response.addRecord(DnsSection.ANSWER, answer);
|
||||||
ctx.writeAndFlush(response);
|
ctx.writeAndFlush(response);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user