Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Let conntrack track non-NATed short-lived connections #2527

Merged
merged 3 commits into from
May 18, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions integration/350_container_to_container_edge_no_weave_test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#! /bin/bash

# shellcheck disable=SC1091
. ./config.sh

start_suite "Test short lived connections between containers without Weave (no NAT)"

scope_on "$HOST1" launch
docker_on "$HOST1" run -d --name nginx nginx
wait_for_containers "$HOST1" 60 nginx
nginx_ip="$(docker_on "$HOST1" inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' nginx)"
docker_on "$HOST1" run -d --name client alpine /bin/sh -c "while true; do \
wget $nginx_ip:80/ -O - >/dev/null || true; \
sleep 1; \
done"
wait_for_containers "$HOST1" 60 client

has_container "$HOST1" nginx
has_container "$HOST1" client
has_connection containers "$HOST1" client nginx

scope_end_suite
2 changes: 1 addition & 1 deletion probe/endpoint/connection_tracker.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ func newProcfsConnectionTracker(conf connectionTrackerConfig) connectionTracker
}
return connectionTracker{
conf: conf,
flowWalker: newConntrackFlowWalker(conf.UseConntrack, conf.ProcRoot, conf.BufferSize, "--any-nat"),
flowWalker: newConntrackFlowWalker(conf.UseConntrack, conf.ProcRoot, conf.BufferSize),
ebpfTracker: nil,
reverseResolver: newReverseResolver(),
}
Expand Down