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: resolve/nr6.c
- Revision:
- 128:79052cb4a41c
- Parent:
- 116:60521b29e4c9
- Child:
- 132:db2174b36a6d
--- a/resolve/nr6.c Fri Mar 08 18:43:56 2019 +0000
+++ b/resolve/nr6.c Mon Mar 11 16:42:45 2019 +0000
@@ -7,9 +7,10 @@
#include "net.h"
#include "mac.h"
#include "ip6addr.h"
+#include "dhcp.h"
#include "dns.h"
-#include "dhcp.h"
#include "dnsquery.h"
+#include "dnslabel.h"
#include "http.h"
bool Nr6Trace = false;
@@ -55,7 +56,7 @@
for (int i = 0; i < RECORDS_COUNT; i++)
{
if (records[i].state == STATE_EMPTY) continue;
- if (DnsHostNamesEquate(records[i].name, name)) return i;
+ if (DnsLabelIsSame(records[i].name, name)) return i;
}
return -1;
}
@@ -65,7 +66,7 @@
{
if (records[i].state == STATE_EMPTY) continue;
if (!Ip6AddressIsEmpty(records[i].ip)) continue;
- if (DnsHostNamesEquate(records[i].name, name)) return i;
+ if (DnsLabelIsSame(records[i].name, name)) return i;
}
return -1;
}
@@ -180,8 +181,8 @@
{
if (Nr6Trace)
{
- if (DnsHostNamesEquate(name, records[i].name)) LogTimeF("NR - confirm existing ");
- else LogTimeF("NR - replace name for existing ip ");
+ if (DnsLabelIsSame(name, records[i].name)) LogTimeF("NR - confirm existing ");
+ else LogTimeF("NR - replace name for existing ip ");
Ip6AddressLog(ip);
Log(" == '");
Log(name);
@@ -247,7 +248,7 @@
{
if (records[i].state == STATE_EMPTY) continue;
if(Ip6AddressIsEmpty(records[i].ip)) continue;
- if (!DnsHostNamesEquate(records[i].name, name)) continue;
+ if (!DnsLabelIsSame(records[i].name, name)) continue;
uint32_t age = MsTimerCount - records[i].elapsed;
if (age <= newest)
{
@@ -262,7 +263,7 @@
{
if (records[i].state == STATE_EMPTY) continue;
if(Ip6AddressIsEmpty(records[i].ip)) continue;
- if (!DnsHostNamesEquate(records[i].name, name)) return true;
+ if (!DnsLabelIsSame(records[i].name, name)) return true;
}
return false;
}