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:
194:f35c6e218de1
Parent:
191:33392a61182e
--- a/udp/dns/dnsname.c	Sun Jan 24 15:09:55 2021 +0000
+++ b/udp/dns/dnsname.c	Thu Mar 04 12:08:14 2021 +0000
@@ -225,6 +225,7 @@
     bool nameStarted = false;
     int depth = 0;
     char* p = pStart;
+    char* pNameStart = pName;
     while (true)
     {
         if (p >= DnsHdrData + DnsHdrDataLength)
@@ -255,10 +256,11 @@
         {
             if (pName)
             {
-                if (length + 1 > lenName) //Leave room to terminate the string
+                if (length + 1 > lenName) //Leave room to terminate the string.
+                //Warning removed as had too many 'amzn.dmgr:9D184A89EEDE554B15EABD4931BB839B:S/FRy5cPXE:914584' alerts
                 {
                     *pName = 0;
-                    LogTimeF("DnsNameDecodePtr overran name buffer\r\n");
+                    //LogTimeF("DnsNameDecodePtr decoded name '%s' overran name buffer trying to add %d bytes\r\n", pNameStart, length);
                     return;
                 }
                 lenName -= length + 1; //name chunk plus a '.'