Skip to content

Commit 6d92d2c

Browse files
committed
TestConntrackFlowsLeak: use busybox "nc"
The appropriate/nc image was last built over 6 years ago, and uses the deprecated v2 schema 1 format. https://github.com/appropriate/docker-nc/tree/master/latest The image is just a plain "apk install" of netbsd-netcat, but was added in 1c4286b, because at the time the busybox nc had some bugs. These appear to be resolved, so we can use the busybox nc, from the frozen images. Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
1 parent 4fafb27 commit 6d92d2c

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

integration-cli/docker_cli_network_unix_test.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1747,12 +1747,12 @@ func (s *DockerNetworkSuite) TestConntrackFlowsLeak(c *testing.T) {
17471747
assertNwIsAvailable(c, "testbind")
17481748

17491749
// Launch the server, this will remain listening on an exposed port and reply to any request in a ping/pong fashion
1750-
cmd := "while true; do echo hello | nc -w 1 -lu 8080; done"
1751-
cli.DockerCmd(c, "run", "-d", "--name", "server", "--net", "testbind", "-p", "8080:8080/udp", "appropriate/nc", "sh", "-c", cmd)
1750+
cmd := "while true; do echo hello | nc -w 1 -l -u -p 8080; done"
1751+
cli.DockerCmd(c, "run", "-d", "--name", "server", "--net", "testbind", "-p", "8080:8080/udp", "busybox", "sh", "-c", cmd)
17521752

17531753
// Launch a container client, here the objective is to create a flow that is natted in order to expose the bug
1754-
cmd = "echo world | nc -q 1 -u 192.168.10.1 8080"
1755-
cli.DockerCmd(c, "run", "-d", "--name", "client", "--net=host", "appropriate/nc", "sh", "-c", cmd)
1754+
cmd = "echo world | nc -w 1 -u 192.168.10.1 8080"
1755+
cli.DockerCmd(c, "run", "-d", "--name", "client", "--net=host", "busybox", "sh", "-c", cmd)
17561756

17571757
// Get all the flows using netlink
17581758
flows, err := netlink.ConntrackTableList(netlink.ConntrackTable, unix.AF_INET)

0 commit comments

Comments
 (0)