openshift / coredns-mdns

CoreDNS plugin that serves .local mDNS info over normal DNS

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Lookup does not work when only IPv6 in mDNS entry

bcrochet opened this issue · comments

Using mdns-publisher, a number of entries are created, but with only IPv6 addresses. When an IPv4 and IPv6 address are present in the mDNS entry, both are returned when queried. But when only IPv6 is in the entry, no response is made.

First, when an IPv4 is present

[bcrochet@bcrochet baremetal-runtimecfg]$ dig @localhost -p 5335 etcd-0.example.com.
...SNIP...
;; ANSWER SECTION:
etcd-0.example.com. 60 IN A 192.168.1.111
etcd-0.example.com. 60 IN AAAA fd0b:3ad:ccf:8748::100

And when the IPv4 is removed

[bcrochet@bcrochet baremetal-runtimecfg]$ dig @localhost -p 5335 etcd-0.example.com.
;; Warning: Message parser reports malformed message packet.

; <<>> DiG 9.11.10-RedHat-9.11.10-1.fc30 <<>> @localhost -p 5335 etcd-0.example.com.
; (2 servers found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 9040
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 0, ADDITIONAL: 1
;; WARNING: Message has 69 extra bytes at end

;; QUESTION SECTION:
;etcd-0.example.com. IN A

;; Query time: 0 msec
;; SERVER: 127.0.0.1#5335(127.0.0.1)
;; WHEN: Thu Oct 10 08:45:38 EDT 2019
;; MSG SIZE rcvd: 135

There are some Warnings in the second response.

Hmm, what does your mdns-publisher config look like? I'm not seeing this behavior with just an ipv6 in my local environment:

;; ANSWER SECTION:
etcd-0.foo.com. 60 IN AAAA fe80::f816:3eff:fe18:bd46

This is using the latest master of both coredns-mdns and mdns-publisher.

Hmm, what does your mdns-publisher config look like? I'm not seeing this behavior with just an ipv6 in my local environment:

;; ANSWER SECTION:
etcd-0.foo.com. 60 IN AAAA fe80::f816:3eff:fe18:bd46

This is using the latest master of both coredns-mdns and mdns-publisher.

bind_address = "fd0b:3ad:ccf:8748::100"
collision_avoidance = "hostname"

service {
name = "Etcd"
host_name = "etcd-0.local."
type = "_etcd-server-ssl._tcp"
domain = "local."
port = 2380
ttl = 300
}

service {
name = "workstation"
host_name = "master-0.local."
type = "_workstation._tcp"
domain = "local."
port = 42424
ttl = 300
}

service {
name = "EtcdWorkstation"
host_name = "etcd-0.local."
type = "_workstation._tcp"
domain = "local."
port = 42424
ttl = 300
}

And the Corefile I'm using:

example.com:5335 {
mdns example.com 0
debug
log
}

19: nic1: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
link/ether ee:7e:12:19:2a:9d brd ff:ff:ff:ff:ff:ff
inet6 fd0b:3ad:ccf:8748::5/64 scope global tentative
valid_lft forever preferred_lft forever
inet6 fd0b:3ad:ccf:8748::4/64 scope global tentative
valid_lft forever preferred_lft forever
inet6 fd0b:3ad:ccf:8748::2/64 scope global tentative
valid_lft forever preferred_lft forever
inet6 fd0b:3ad:ccf:8748::100/64 scope global tentative
valid_lft forever preferred_lft forever

Fixed in latest mdns-publisher