Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: oldheating gps motorhome heating
Diff: udp/dns/dnslabel.c
- Revision:
- 182:ff48c6ea91c1
- Parent:
- 128:79052cb4a41c
- Child:
- 183:ee809769bf89
--- a/udp/dns/dnslabel.c Mon Jan 04 16:07:45 2021 +0000
+++ b/udp/dns/dnslabel.c Sun Jan 10 11:52:19 2021 +0000
@@ -29,10 +29,12 @@
{
int i = 0;
char c;
+ bool isExternal = false;
while (i < size - 1)
{
c = *p++;
+ if (c == '.') isExternal = true;
if (!c) break;
*result++ = c;
i++;
@@ -48,7 +50,7 @@
i++;
}
}
- if (protocol == DNS_PROTOCOL_UDNS && DhcpDomainName[0]) //Shouldn't do this in IPv6 as DHCP is IPv4 only
+ if (protocol == DNS_PROTOCOL_UDNS && !isExternal && DhcpDomainName[0]) //Shouldn't do this in IPv6 as DHCP is IPv4 only
{
if (i < size - 1)
{