headers: change Transport.Destination type to net.IP

This commit is contained in:
aler9
2021-06-19 18:58:31 +02:00
parent 84f174f10f
commit ff8c485b11
6 changed files with 24 additions and 13 deletions

View File

@@ -456,7 +456,7 @@ func TestServerRead(t *testing.T) {
require.NoError(t, err)
for _, intf := range intfs {
err := p.JoinGroup(&intf, &net.UDPAddr{IP: net.ParseIP(*th.Destination)})
err := p.JoinGroup(&intf, &net.UDPAddr{IP: *th.Destination})
require.NoError(t, err)
}
@@ -470,7 +470,7 @@ func TestServerRead(t *testing.T) {
require.NoError(t, err)
for _, intf := range intfs {
err := p.JoinGroup(&intf, &net.UDPAddr{IP: net.ParseIP(*th.Destination)})
err := p.JoinGroup(&intf, &net.UDPAddr{IP: *th.Destination})
require.NoError(t, err)
}
}
@@ -532,7 +532,7 @@ func TestServerRead(t *testing.T) {
case "multicast":
l2.WriteTo([]byte{0x01, 0x02, 0x03, 0x04}, &net.UDPAddr{
IP: net.ParseIP(*th.Destination),
IP: *th.Destination,
Port: th.Ports[1],
})
<-framesReceived