mirror of
https://github.com/espressif/esp-protocols.git
synced 2026-07-07 17:10:52 +02:00
fix(mdns): Fix wrong "truncated AAAA" error
This commit is contained in:
@@ -293,12 +293,12 @@ void static dbg_packet(const uint8_t *data, size_t len)
|
||||
}
|
||||
dbg_printf("\n");
|
||||
} else if (type == MDNS_TYPE_AAAA) {
|
||||
if (data_len < sizeof(esp_ip6_addr_t)) {
|
||||
if (data_len < MDNS_ANSWER_AAAA_SIZE) {
|
||||
dbg_printf("ERROR: truncated AAAA\n");
|
||||
continue;
|
||||
}
|
||||
esp_ip6_addr_t ip6;
|
||||
memcpy(&ip6, data_ptr, sizeof(esp_ip6_addr_t));
|
||||
esp_ip6_addr_t ip6 = {0};
|
||||
memcpy(&ip6.addr, data_ptr, MDNS_ANSWER_AAAA_SIZE);
|
||||
dbg_printf(IPV6STR "\n", IPV62STR(ip6));
|
||||
} else if (type == MDNS_TYPE_A) {
|
||||
if (data_len < sizeof(esp_ip4_addr_t)) {
|
||||
|
||||
Reference in New Issue
Block a user