diff options
author | gVisor bot <gvisor-bot@google.com> | 2020-07-28 18:01:54 -0700 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2020-07-28 18:01:54 -0700 |
commit | 1e829a7c860756a9f24aac09c6880733f864499b (patch) | |
tree | b0e698d4157266a31a53ebe376c220540cd99cec /test/iptables/runner | |
parent | c1c643abe7be45991c8004d0de2b31716702d527 (diff) | |
parent | d9c9420335a78b54bc04ec0639d89539b4c3972c (diff) |
Merge pull request #3025 from kevinGC:ipv6-iptables-testing2
PiperOrigin-RevId: 323692144
Diffstat (limited to 'test/iptables/runner')
-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) } |