From d9c9420335a78b54bc04ec0639d89539b4c3972c Mon Sep 17 00:00:00 2001 From: Kevin Krakauer Date: Sun, 14 Jun 2020 22:40:46 -0700 Subject: ip6tables testing We skip gVisor tests for now, as ip6tables aren't yet implemented. --- test/iptables/runner/main.go | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'test/iptables/runner/main.go') diff --git a/test/iptables/runner/main.go b/test/iptables/runner/main.go index 6f77c0684..69d3ef121 100644 --- a/test/iptables/runner/main.go +++ b/test/iptables/runner/main.go @@ -24,7 +24,10 @@ import ( "gvisor.dev/gvisor/test/iptables" ) -var name = flag.String("name", "", "name of the test to run") +var ( + name = flag.String("name", "", "name of the test to run") + ipv6 = flag.Bool("ipv6", false, "whether the test utilizes ip6tables") +) func main() { flag.Parse() @@ -43,7 +46,7 @@ func main() { } // Run the test. - if err := test.ContainerAction(ip); err != nil { + if err := test.ContainerAction(ip, *ipv6); err != nil { log.Fatalf("Failed running test %q: %v", *name, err) } @@ -57,7 +60,7 @@ func getIP() (net.IP, error) { localAddr := net.TCPAddr{ Port: iptables.IPExchangePort, } - listener, err := net.ListenTCP("tcp4", &localAddr) + listener, err := net.ListenTCP("tcp", &localAddr) if err != nil { return net.IP{}, fmt.Errorf("failed listening for IP: %v", err) } -- cgit v1.2.3