Revision 3c58577ece0c299f7b5aacabac4d0ff56d70ea38 authored by Daniel Borkmann on 18 March 2019, 10:05:06 UTC, committed by Thomas Graf on 18 March 2019, 16:23:55 UTC
The CT dump currently shows swapped src/dst address entries even
though it's correctly using src address resp. dst address as data.

Issue is that 7afe903203c3 ("bpf: Global 5 tuple conntrack.") did
not swap the initial tuple for the lookup when converting from
local to global table, and all the current code right now is doing
workarounds in order to not break CT table during version upgrade.

Thus same needs to be done here for the dump. Issue became more
apparent after aaf6ba39ad4e ("ctmap: Fix order of CtKey{4,6} struct
fields"), which might have had been swapped on purpose but without
further comments in the code on why it was swapped on daemon side.

In this case, reverting aaf6ba39ad4e doesn't fully fix it either
since then direction also needs to be swapped. Instead, make it
less confusing and only swap what needs to be swapped, that is, the
address parts since in the datapath this is the only thing that
should have been done but was missed back then. For next major
version upgrade (aka 2.0), this will be properly fixed (at the
cost of disruptive upgrade).

Fixes: 7afe903203c3 ("bpf: Global 5 tuple conntrack.")
Fixes: aaf6ba39ad4e ("ctmap: Fix order of CtKey{4,6} struct fields")
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
1 parent adedcff
History
File Mode Size
.github
.travis
Documentation
api
bpf
bugtool
cilium
cilium-health
common
contrib
daemon
envoy
examples
hack
monitor
operator
pkg
plugins
proxylib
test
tests
tools
vendor
.authors.aux -rw-r--r-- 416 bytes
.gitignore -rw-r--r-- 857 bytes
.gitmodules -rw-r--r-- 0 bytes
.mailmap -rw-r--r-- 737 bytes
.travis.yml -rw-r--r-- 424 bytes
AUTHORS -rw-r--r-- 5.5 KB
CODEOWNERS -rw-r--r-- 4.1 KB
CONTRIBUTING.md -rw-r--r-- 195 bytes
Dockerfile -rw-r--r-- 2.0 KB
Dockerfile.builder -rw-r--r-- 1.1 KB
Gopkg.lock -rw-r--r-- 53.5 KB
Gopkg.toml -rw-r--r-- 13.0 KB
Jenkinsfile.nightly -rw-r--r-- 4.7 KB
LICENSE -rw-r--r-- 11.1 KB
Makefile -rw-r--r-- 15.0 KB
Makefile.defs -rw-r--r-- 1.6 KB
Makefile.quiet -rw-r--r-- 625 bytes
NEWS.rst -rw-r--r-- 66.6 KB
README.rst -rw-r--r-- 14.7 KB
VERSION -rw-r--r-- 7 bytes
Vagrantfile -rw-r--r-- 12.1 KB
cilium-docker-plugin.Dockerfile -rw-r--r-- 518 bytes
cilium-operator.Dockerfile -rw-r--r-- 502 bytes
docs.Jenkinsfile -rw-r--r-- 2.6 KB
flannel.Jenkinsfile -rw-r--r-- 3.4 KB
ginkgo-kubernetes-all.Jenkinsfile -rw-r--r-- 6.5 KB
ginkgo.Jenkinsfile -rw-r--r-- 4.2 KB
kubernetes-upstream.Jenkinsfile -rw-r--r-- 4.2 KB

README.rst

back to top