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/dnsserver.c
- Revision:
- 177:2cd7fde8bfe5
- Parent:
- 172:9bc3c7b2cca1
- Child:
- 178:52714fef5ca1
diff -r 7eb916c22084 -r 2cd7fde8bfe5 udp/dns/dnsserver.c
--- a/udp/dns/dnsserver.c Sat Dec 26 17:07:02 2020 +0000
+++ b/udp/dns/dnsserver.c Sun Dec 27 17:26:21 2020 +0000
@@ -87,9 +87,12 @@
//Handle the questions
if (nodeIsName4 && recordType == DNS_RECORD_A ) answers[answerCount++] = RECORD_A;
- if (nodeIsName6 && recordType == DNS_RECORD_AAAA) { answers[answerCount++] = RECORD_AAAA_LINK_LOCAL;
- answers[answerCount++] = RECORD_AAAA_UNIQUE_LOCAL;
- answers[answerCount++] = RECORD_AAAA_GLOBAL; }
+ if (nodeIsName6 && recordType == DNS_RECORD_AAAA)
+ {
+ answers[answerCount++] = RECORD_AAAA_LINK_LOCAL;
+ if (SlaacUniqueLocalIp[0]) answers[answerCount++] = RECORD_AAAA_UNIQUE_LOCAL;
+ if (SlaacGlobalIp [0]) answers[answerCount++] = RECORD_AAAA_GLOBAL;
+ }
if (nodeIsAddr4 && recordType == DNS_RECORD_PTR ) answers[answerCount++] = RECORD_PTR4;
if (nodeIsLocl6 && recordType == DNS_RECORD_PTR ) answers[answerCount++] = RECORD_PTR6_LINK_LOCAL;
if (nodeIsUniq6 && recordType == DNS_RECORD_PTR ) answers[answerCount++] = RECORD_PTR6_UNIQUE_LOCAL;