https://github.com/cilium/cilium
Revision b1d6e8b83863ad413cfbb5ad90094724a11de50e authored by Nate Sweet on 13 March 2024, 16:03:14 UTC, committed by Julian Wiedmann on 03 April 2024, 07:26:55 UTC
[ upstream commit 1941679572fd10932f20beb30a0dc6fd4c70c05f ]

DNS Proxy needs to account for protocol when indexing
L7 DNS rules that it needs to adhere to, otherwise
L7 rules with differing port-protocols can override
each other (nondeterministically) and create overly
restrictive, and incorrect DNS rules. The problem with
accounting for protocol is that Endpoint restoration
logic uses DNS rules that index to port-only as JSON
saved to disk. Adding an additional protocol index to
a map structure changes the JSON structure and breaks
restoration logic between Cilium versions.

This change makes the map index backwards compatible,
since it changes the index from a uint16 to a uint32,
both of which marshal the same into a JSON structure.
The endpoint restoration logic will succeed between
versions, because the older version will be
automatically differentiated with a lack of a 1-bit
at bit position 24. Version 2 will save a 1 bit at the
24th bit going forward to differentiate when protocol
is indexed or not present.

Signed-off-by: Nate Sweet <nathanjsweet@pm.me>
1 parent 757634d
History
Tip revision: b1d6e8b83863ad413cfbb5ad90094724a11de50e authored by Nate Sweet on 13 March 2024, 16:03:14 UTC
fqdn: Update DNS Restore to Index to PortProto
Tip revision: b1d6e8b
File Mode Size
.github
.nvim
.vscode
Documentation
api
bpf
bugtool
cilium
cilium-health
clustermesh-apiserver
contrib
daemon
envoy
examples
hack
hubble-relay
images
install
jenkinsfiles
operator
pkg
plugins
test
tools
vendor
.authors.aux -rw-r--r-- 416 bytes
.clomonitor.yml -rw-r--r-- 984 bytes
.gitattributes -rw-r--r-- 689 bytes
.gitignore -rw-r--r-- 1.7 KB
.golangci.yaml -rw-r--r-- 3.1 KB
.mailmap -rw-r--r-- 5.9 KB
AUTHORS -rw-r--r-- 38.5 KB
CHANGELOG.md -rw-r--r-- 208.5 KB
CODEOWNERS -rw-r--r-- 11.6 KB
CODE_OF_CONDUCT.md -rw-r--r-- 2.2 KB
CONTRIBUTING.md -rw-r--r-- 473 bytes
FURTHER_READINGS.rst -rw-r--r-- 6.4 KB
LICENSE -rw-r--r-- 11.1 KB
MAINTAINERS.md -rw-r--r-- 4.3 KB
Makefile -rw-r--r-- 28.2 KB
Makefile.defs -rw-r--r-- 6.5 KB
Makefile.docker -rw-r--r-- 6.9 KB
Makefile.quiet -rw-r--r-- 818 bytes
README.rst -rw-r--r-- 17.4 KB
SECURITY.md -rw-r--r-- 629 bytes
USERS.md -rw-r--r-- 24.5 KB
VERSION -rw-r--r-- 8 bytes
Vagrantfile -rw-r--r-- 14.7 KB
go.mod -rw-r--r-- 12.0 KB
go.sum -rw-r--r-- 155.4 KB
netlify.toml -rw-r--r-- 92 bytes
vagrant_box_defaults.rb -rw-r--r-- 394 bytes

README.rst

back to top