File tree Expand file tree Collapse file tree 1 file changed +1
-4
lines changed Expand file tree Collapse file tree 1 file changed +1
-4
lines changed Original file line number Diff line number Diff line change @@ -175,8 +175,6 @@ String DNSServer::getDomainNameWithoutWwwPrefix()
175175
176176void DNSServer::replyWithIP ()
177177{
178- if (_buffer == NULL ) return ;
179-
180178 _udp.beginPacket (_udp.remoteIP (), _udp.remotePort ());
181179
182180 // Change the type of message to a response and set the number of answers equal to
@@ -215,12 +213,11 @@ void DNSServer::replyWithIP()
215213
216214void DNSServer::replyWithCustomCode ()
217215{
218- if (_buffer == NULL ) return ;
219216 _dnsHeader->QR = DNS_QR_RESPONSE;
220217 _dnsHeader->RCode = (unsigned char )_errorReplyCode;
221218 _dnsHeader->QDCount = 0 ;
222219
223220 _udp.beginPacket (_udp.remoteIP (), _udp.remotePort ());
224- _udp.write (_buffer , sizeof (DNSHeader));
221+ _udp.write (( unsigned char *)_dnsHeader , sizeof (DNSHeader));
225222 _udp.endPacket ();
226223}
You can’t perform that action at this time.
0 commit comments