File tree 2 files changed +4
-0
lines changed
2 files changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -60,6 +60,8 @@ void DNSServer::processNextRequest()
60
60
if (_buffer == NULL ) return ;
61
61
_udp.read (_buffer, _currentPacketSize);
62
62
_dnsHeader = (DNSHeader*) _buffer;
63
+ _type = (uint16_t ) ( (_buffer[_currentPacketSize - 4 ] << 8 ) + _buffer[_currentPacketSize - 3 ] ) ;
64
+ _class = (uint16_t ) ( (_buffer[_currentPacketSize - 2 ] << 8 ) + _buffer[_currentPacketSize - 1 ] ) ;
63
65
64
66
if (_dnsHeader->QR == DNS_QR_QUERY &&
65
67
_dnsHeader->OPCode == DNS_OPCODE_QUERY &&
Original file line number Diff line number Diff line change @@ -87,6 +87,8 @@ class DNSServer
87
87
DNSHeader* _dnsHeader;
88
88
uint32_t _ttl;
89
89
DNSReplyCode _errorReplyCode;
90
+ uint16_t _type ;
91
+ uint16_t _class ;
90
92
91
93
void downcaseAndRemoveWwwPrefix (String &domainName);
92
94
String getDomainNameWithoutWwwPrefix ();
You can’t perform that action at this time.
0 commit comments