snaps do not resolve zeroconf DNS names

Bug #1793736 reported by Casey Marshall
14
This bug affects 3 people
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://$(hostname).local` works.

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.094/0.096/0.002 ms
$ dig myhost.local

; <<>> DiG 9.11.3-1ubuntu1.2-Ubuntu <<>> myhost.local
;; 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.53#53(127.0.0.53)
;; 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://myhost.local: dial tcp: lookup myhost.local: no such host
$

Michael Vogt (mvo)
Changed in snapd:
importance: Undecided → Medium
Changed in snapd:
status: New → Triaged
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.