tstest/natlab: use &Network in test.

Signed-off-by: David Anderson <danderson@tailscale.com>
This commit is contained in:
David Anderson 2020-07-03 02:21:51 +00:00
parent 622c0d0cb3
commit c53b154171
1 changed files with 3 additions and 3 deletions

View File

@ -78,7 +78,7 @@ func TestSendPacket(t *testing.T) {
} }
func TestMultiNetwork(t *testing.T) { func TestMultiNetwork(t *testing.T) {
lan := Network{ lan := &Network{
Name: "lan", Name: "lan",
Prefix4: mustPrefix("192.168.0.0/24"), Prefix4: mustPrefix("192.168.0.0/24"),
} }
@ -88,9 +88,9 @@ func TestMultiNetwork(t *testing.T) {
nat := NewMachine("nat") nat := NewMachine("nat")
server := NewMachine("server") server := NewMachine("server")
ifClient := client.Attach("eth0", &lan) ifClient := client.Attach("eth0", lan)
ifNATWAN := nat.Attach("ethwan", internet) ifNATWAN := nat.Attach("ethwan", internet)
ifNATLAN := nat.Attach("ethlan", &lan) ifNATLAN := nat.Attach("ethlan", lan)
ifServer := server.Attach("eth0", internet) ifServer := server.Attach("eth0", internet)
clientPC, err := client.ListenPacket("udp", ":123") clientPC, err := client.ListenPacket("udp", ":123")