A stack which works with or without an Mbed os library. Provides IPv4 or IPv6 with a full 1500 byte buffer.

Dependents:   oldheating gps motorhome heating

Revision:
170:96c637dc3f52
Parent:
128:79052cb4a41c
Child:
172:9bc3c7b2cca1
diff -r 336d499dc560 -r 96c637dc3f52 udp/dns/dnsreply.c
--- a/udp/dns/dnsreply.c	Tue Dec 01 12:56:34 2020 +0000
+++ b/udp/dns/dnsreply.c	Wed Dec 09 18:11:05 2020 +0000
@@ -123,11 +123,18 @@
 }
 int DnsReplyHandle(void (*traceback)(void), int dnsProtocol)
 {
-    
     bool ok = true;
     if (!DnsHdrAncount) ok = false;
 
     p = DnsHdrData;
+    
+    if (DnsReplyTrace || NetTraceHostGetMatched())
+    {
+        if (NetTraceNewLine) Log("\r\n");
+        LogTimeF("DnsReply received\r\n");
+        if (NetTraceStack) traceback();
+        DnsHdrLog(dnsProtocol);
+    }
 
     if (ok)
     {
@@ -157,14 +164,5 @@
     NetTraceHostCheckIp6(DnsReplyIp6);
     NetTraceHostCheckIp6(DnsReplyRecordNameAsIp6);
     
-    if (DnsReplyTrace || NetTraceHostGetMatched())
-    {
-        if (NetTraceNewLine) Log("\r\n");
-        LogTimeF("DnsReply received\r\n");
-        if (NetTraceStack) traceback();
-        DnsHdrLog(dnsProtocol);
-    }
-
-    
     return DO_NOTHING;
 }