diff options
Diffstat (limited to 'pkg/tcpip')
-rw-r--r-- | pkg/tcpip/adapters/gonet/gonet_test.go | 4 | ||||
-rw-r--r-- | pkg/tcpip/network/ipv6/icmp_test.go | 4 | ||||
-rw-r--r-- | pkg/tcpip/sample/tun_tcp_echo/main.go | 2 | ||||
-rw-r--r-- | pkg/tcpip/tcpip.go | 2 | ||||
-rw-r--r-- | pkg/tcpip/tcpip_test.go | 2 |
5 files changed, 7 insertions, 7 deletions
diff --git a/pkg/tcpip/adapters/gonet/gonet_test.go b/pkg/tcpip/adapters/gonet/gonet_test.go index 86a82f21d..79b7c77ee 100644 --- a/pkg/tcpip/adapters/gonet/gonet_test.go +++ b/pkg/tcpip/adapters/gonet/gonet_test.go @@ -68,7 +68,7 @@ func newLoopbackStack() (*stack.Stack, *tcpip.Error) { // IPv4 { Destination: tcpip.Address(strings.Repeat("\x00", 4)), - Mask: tcpip.Address(strings.Repeat("\x00", 4)), + Mask: tcpip.AddressMask(strings.Repeat("\x00", 4)), Gateway: "", NIC: NICID, }, @@ -76,7 +76,7 @@ func newLoopbackStack() (*stack.Stack, *tcpip.Error) { // IPv6 { Destination: tcpip.Address(strings.Repeat("\x00", 16)), - Mask: tcpip.Address(strings.Repeat("\x00", 16)), + Mask: tcpip.AddressMask(strings.Repeat("\x00", 16)), Gateway: "", NIC: NICID, }, diff --git a/pkg/tcpip/network/ipv6/icmp_test.go b/pkg/tcpip/network/ipv6/icmp_test.go index b8e53c13e..fabbdc8c7 100644 --- a/pkg/tcpip/network/ipv6/icmp_test.go +++ b/pkg/tcpip/network/ipv6/icmp_test.go @@ -108,14 +108,14 @@ func newTestContext(t *testing.T) *testContext { c.s0.SetRouteTable( []tcpip.Route{{ Destination: lladdr1, - Mask: tcpip.Address(strings.Repeat("\xff", 16)), + Mask: tcpip.AddressMask(strings.Repeat("\xff", 16)), NIC: 1, }}, ) c.s1.SetRouteTable( []tcpip.Route{{ Destination: lladdr0, - Mask: tcpip.Address(strings.Repeat("\xff", 16)), + Mask: tcpip.AddressMask(strings.Repeat("\xff", 16)), NIC: 1, }}, ) diff --git a/pkg/tcpip/sample/tun_tcp_echo/main.go b/pkg/tcpip/sample/tun_tcp_echo/main.go index a4b28a7a3..910d1257f 100644 --- a/pkg/tcpip/sample/tun_tcp_echo/main.go +++ b/pkg/tcpip/sample/tun_tcp_echo/main.go @@ -150,7 +150,7 @@ func main() { s.SetRouteTable([]tcpip.Route{ { Destination: tcpip.Address(strings.Repeat("\x00", len(addr))), - Mask: tcpip.Address(strings.Repeat("\x00", len(addr))), + Mask: tcpip.AddressMask(strings.Repeat("\x00", len(addr))), Gateway: "", NIC: 1, }, diff --git a/pkg/tcpip/tcpip.go b/pkg/tcpip/tcpip.go index 5f210cdd0..f5b5ec86b 100644 --- a/pkg/tcpip/tcpip.go +++ b/pkg/tcpip/tcpip.go @@ -490,7 +490,7 @@ type Route struct { // Mask specifies which bits of the Destination and the target address // must match for this row to be viable. - Mask Address + Mask AddressMask // Gateway is the gateway to be used if this row is viable. Gateway Address diff --git a/pkg/tcpip/tcpip_test.go b/pkg/tcpip/tcpip_test.go index 9b20c74c6..d283f71c7 100644 --- a/pkg/tcpip/tcpip_test.go +++ b/pkg/tcpip/tcpip_test.go @@ -123,7 +123,7 @@ func TestSubnetCreation(t *testing.T) { func TestRouteMatch(t *testing.T) { tests := []struct { d Address - m Address + m AddressMask a Address want bool }{ |