esp8266 / Arduino

ESP8266 core for Arduino
GNU Lesser General Public License v2.1
15.96k stars 13.34k forks source link

mDNS library does not send IPv6 packets and does not provide AAAA records #6135

Open owendelong opened 5 years ago

owendelong commented 5 years ago

Basic Infos

Platform

Settings in IDE

Problem Description

Running mDNS on an ESP8266 with an IPv6 enabled sketch only transmits IPv4 mDNS packets and even those packets do not include AAAA information for the IPv6 address.

MCVE Sketch

Reproduceable with example sketches.

Debug Messages

N/A

Further information: tcpdump -v -n -s 1500 ether host and port 5353 193.0.27.131.5353 > 224.0.0.251.5353: 0- [0q] 4/0/1 _services._dns-sd._udp.local. PTR _arduino._tcp.local., _arduino._tcp.local. PTR gr8LED-701777._arduino._tcp.local., gr8LED-701777._arduino._tcp.local. (Cache flush) SRV gr8LED-701777.local.:8266 0 0, gr8LED-701777._arduino._tcp.local. (Cache flush) TXT "auth_upload=yes" "board="ESP8266_ESP12"" "ssh_upload=no" "tcp_check=no" (252) 08:27:49.924159 IP (tos 0x0, ttl 255, id 17, offset 0, flags [none], proto UDP (17), length 114) 193.0.27.131.5353 > 224.0.0.251.5353: 0- [0q] 2/0/0 gr8LED-701777.local. (Cache flush) A 193.0.27.131, 131.27.0.193.in-addr.arpa. (Cache flush) PTR gr8LED-701777.local. (86) 08:27:49.924986 IP (tos 0x0, ttl 255, id 18, offset 0, flags [none], proto UDP (17), length 280) 193.0.27.131.5353 > 224.0.0.251.5353: 0- [0q] 4/0/1 _services._dns-sd._udp.local. PTR _arduino._tcp.local., _arduino._tcp.local. PTR gr8LED-701777._arduino._tcp.local., gr8LED-701777._arduino._tcp.local. (Cache flush) SRV gr8LED-701777.local.:8266 0 0, gr8LED-701777._arduino._tcp.local. (Cache flush) TXT "auth_upload=yes" "board="ESP8266_ESP12"" "ssh_upload=no" "tcp_check=no" (252) 08:27:50.846542 IP (tos 0x0, ttl 255, id 19, offset 0, flags [none], proto UDP (17), length 114) 193.0.27.131.5353 > 224.0.0.251.5353: 0- [0q] 2/0/0 gr8LED-701777.local. (Cache flush) A 193.0.27.131, 131.27.0.193.in-addr.arpa. (Cache flush) PTR gr8LED-701777.local. (86) 08:27:50.948694 IP (tos 0x0, ttl 255, id 20, offset 0, flags [none], proto UDP (17), length 280) 193.0.27.131.5353 > 224.0.0.251.5353: 0- [0q] 4/0/1 _services._dns-sd._udp.local. PTR _arduino._tcp.local., _arduino._tcp.local. PTR gr8LED-701777._arduino._tcp.local., gr8LED-701777._arduino._tcp.local. (Cache flush) SRV gr8LED-701777.local.:8266 0 0, gr8LED-701777._arduino._tcp.local. (Cache flush) TXT "auth_upload=yes" "board="ESP8266_ESP12"" "ssh_upload=no" "tcp_check=no" (252) 08:27:51.871012 IP (tos 0x0, ttl 255, id 21, offset 0, flags [none], proto UDP (17), length 114) 193.0.27.131.5353 > 224.0.0.251.5353: 0- [0q] 2/0/0 gr8LED-701777.local. (Cache flush) A 193.0.27.131, 131.27.0.193.in-addr.arpa. (Cache flush) PTR gr8LED-701777.local. (86) 08:27:51.975507 IP (tos 0x0, ttl 255, id 22, offset 0, flags [none], proto UDP (17), length 280)

Note: no IPv6 packets recorded.

Also: odmbpro2:src owendelong$ ping esp8266-701777.local PING esp8266-701777.local (193.0.27.131): 56 data bytes 64 bytes from 193.0.27.131: icmp_seq=0 ttl=255 time=41.600 ms 64 bytes from 193.0.27.131: icmp_seq=1 ttl=255 time=4.782 ms 64 bytes from 193.0.27.131: icmp_seq=2 ttl=255 time=5.351 ms ^C --- esp8266-701777.local ping statistics --- 3 packets transmitted, 3 packets received, 0.0% packet loss round-trip min/avg/max/stddev = 4.782/17.244/41.600/17.224 ms odmbpro2:src owendelong$ ping6 esp8266-701777.local ping6: getaddrinfo -- nodename nor servname provided, or not known odmbpro2:src owendelong$

And: odmbpro2:src owendelong$ dns-sd -q gr8led-701777.local AAAA IN DATE: ---Thu 23 May 2019--- 8:27:24.490 ...STARTING... ^C odmbpro2:src owendelong$ dns-sd -q gr8led-701777.local A IN DATE: ---Thu 23 May 2019--- 8:41:56.222 ...STARTING... Timestamp A/R Flags if Name Type Class Rdata 8:41:56.223 Add 2 5 gr8LED-701777.local. Addr IN 193.0.27.131

d-a-v commented 5 years ago

IPv6 in mDNS is not yet supported. This is a work in progress.