mirror of
https://github.com/coredns/coredns.git
synced 2025-10-28 08:44:17 -04:00
Fix HostPortOrFile to support IPv6 addresses with zone (#3527)
1. The HostPortOrFile tests don't have any IPv6 tests. This adds some. 2. The HostPortOrFile breaks if any of the addresses have IPv6 zone defined. ParseIP does not handle %zone anymore. Signed-off-by: Brad P. Crochet <brad@redhat.com>
This commit is contained in:
committed by
Miek Gieben
parent
b7977402d6
commit
aa8c325d4a
@@ -34,6 +34,26 @@ func TestHostPortOrFile(t *testing.T) {
|
||||
"127.0.0.1:53",
|
||||
false,
|
||||
},
|
||||
{
|
||||
"fe80::1",
|
||||
"[fe80::1]:53",
|
||||
false,
|
||||
},
|
||||
{
|
||||
"fe80::1%ens3",
|
||||
"[fe80::1%ens3]:53",
|
||||
false,
|
||||
},
|
||||
{
|
||||
"[fd01::1]:153",
|
||||
"[fd01::1]:153",
|
||||
false,
|
||||
},
|
||||
{
|
||||
"[fd01::1%ens3]:153",
|
||||
"[fd01::1%ens3]:153",
|
||||
false,
|
||||
},
|
||||
}
|
||||
|
||||
err := ioutil.WriteFile("resolv.conf", []byte("nameserver 127.0.0.1\n"), 0600)
|
||||
|
||||
Reference in New Issue
Block a user