mirror of
https://github.com/coredns/coredns.git
synced 2026-07-11 18:20:10 -04:00
fix(dnstap): store IPv4-mapped IPv6 addresses as 4 octets with SocketFamily INET (#8186)
Signed-off-by: Jaime Hablutzel <hablutzel1@gmail.com>
This commit is contained in:
@@ -123,8 +123,9 @@ func testMessage() *tap.Message {
|
||||
return &tap.Message{
|
||||
SocketFamily: &inet,
|
||||
SocketProtocol: &udp,
|
||||
QueryAddress: net.ParseIP("10.240.0.1"),
|
||||
QueryPort: &port,
|
||||
// Explicit 4-octet form, because that's the expected dnstap message representation when SocketFamily is INET.
|
||||
QueryAddress: net.ParseIP("10.240.0.1").To4(),
|
||||
QueryPort: &port,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user