diff options
author | Kevin Krakauer <krakauer@google.com> | 2020-06-14 22:40:46 -0700 |
---|---|---|
committer | Kevin Krakauer <krakauer@google.com> | 2020-07-28 10:51:14 -0700 |
commit | d9c9420335a78b54bc04ec0639d89539b4c3972c (patch) | |
tree | ab69c3973150a3931f2814349ca3dada75f0eadb /test/iptables/runner/main.go | |
parent | a05ea20ef1107cc0a4ace94d6dffd7c7e590b264 (diff) |
ip6tables testing
We skip gVisor tests for now, as ip6tables aren't yet implemented.
Diffstat (limited to 'test/iptables/runner/main.go')
-rw-r--r-- | test/iptables/runner/main.go | 9 |
1 files changed, 6 insertions, 3 deletions
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) } |