diff options
author | Googler <noreply@google.com> | 2018-09-28 12:16:47 -0700 |
---|---|---|
committer | Shentubot <shentubot@google.com> | 2018-09-28 12:18:15 -0700 |
commit | fb65b0b471621b430969fe1c3009bee68209bf67 (patch) | |
tree | 7e4d84cb3596bb2def1284388628f6c5f078b58a /pkg | |
parent | e22c4cba47c9e29c7bf6e6c4d064bb7f3a71ca2f (diff) |
Change tcpip.Route.Mask to tcpip.AddressMask.
PiperOrigin-RevId: 214975659
Change-Id: I7bd31a2c54f03ff52203109da312e4206701c44c
Diffstat (limited to 'pkg')
-rw-r--r-- | pkg/dhcp/dhcp_test.go | 2 | ||||
-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 |
6 files changed, 8 insertions, 8 deletions
diff --git a/pkg/dhcp/dhcp_test.go b/pkg/dhcp/dhcp_test.go index a187c5c2a..d60e3752b 100644 --- a/pkg/dhcp/dhcp_test.go +++ b/pkg/dhcp/dhcp_test.go @@ -57,7 +57,7 @@ func createStack(t *testing.T) *stack.Stack { s.SetRouteTable([]tcpip.Route{{ Destination: tcpip.Address(strings.Repeat("\x00", 4)), - Mask: tcpip.Address(strings.Repeat("\x00", 4)), + Mask: tcpip.AddressMask(strings.Repeat("\x00", 4)), Gateway: "", NIC: nicid, }}) 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 }{ |