snaps do not resolve zeroconf DNS names
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
snapd |
Triaged
|
Medium
|
Unassigned |
Bug Description
Steps to reproduce on 18.04:
sudo apt install avahi-daemon avahi-autoipd
Confirm that `ping $(hostname).local` works.
Run a local webserver, confirm that `curl http://
Try to use a snap HTTP (or other network) client with the hostname, it doesn't resolve.
Example (bhttp installed from snap):
$ ping myhost.local
PING myhost.local (10.1.1.1) 56(84) bytes of data.
64 bytes from myhost (10.1.1.1): icmp_seq=1 ttl=64 time=0.092 ms
64 bytes from myhost (10.1.1.1): icmp_seq=2 ttl=64 time=0.096 ms
^C
--- myhost.local ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1001ms
rtt min/avg/max/mdev = 0.092/0.
$ dig myhost.local
; <<>> DiG 9.11.3-
;; global options: +cmd
;; Got answer:
;; WARNING: .local is reserved for Multicast DNS
;; You are currently testing what happens when an mDNS query is leaked to DNS
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 42817
;; flags: qr rd ra; QUERY: 1, ANSWER: 4, AUTHORITY: 0, ADDITIONAL: 1
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 65494
;; QUESTION SECTION:
;myhost.local. IN A
;; ANSWER SECTION:
myhost.local. 0 IN A 10.55.41.114
myhost.local. 0 IN A 10.206.14.1
myhost.local. 0 IN A 172.17.0.1
myhost.local. 0 IN A 10.1.1.1
;; Query time: 0 msec
;; SERVER: 127.0.0.
;; WHEN: Fri Sep 21 06:41:43 CDT 2018
;; MSG SIZE rcvd: 106
$ curl myhost.local
<html>
...
</html>
$ bhttp myhost.local
cannot do HTTP request: Get http://
$
Changed in snapd: | |
importance: | Undecided → Medium |
Changed in snapd: | |
status: | New → Triaged |