https://github.com/cilium/cilium
Revision 5839d2322f3b691e419fcad25a01c29373d96996 authored by Jarno Rajahalme on 01 June 2021, 04:27:37 UTC, committed by Joe Stringer on 29 June 2021, 01:09:22 UTC
Keep old iptables rules by renaming Cilium chains so that new rules
can be added while old are still in use. Copy old TPROXY rules from
the renamed old rules. Remove the backups only after new rules have
been successfully added.

This change makes it possible to keep old rules in effect while adding
new ones without special consideration for transient rules.

On first initialization only copy over the DNS proxy TPROXY rules, as
other proxies can't reuse old proxy ports across restarts.

Pick the last applicable proxy port from iptables, if multiple are
present.

Remove stale TPROXY rules once the current port is known.

Signed-off-by: Jarno Rajahalme <jarno@isovalent.com>
1 parent 537715a
History
Tip revision: 5839d2322f3b691e419fcad25a01c29373d96996 authored by Jarno Rajahalme on 01 June 2021, 04:27:37 UTC
iptables: Keep old rules while adding new ones
Tip revision: 5839d23
File Mode Size
.github
.travis
Documentation
api
bpf
bugtool
cilium
cilium-health
clustermesh-apiserver
contrib
daemon
envoy
examples
hack
hubble-relay
images
install
jenkinsfiles
operator
pkg
plugins
proxylib
test
tests
tools
vendor
.authors.aux -rw-r--r-- 416 bytes
.gitattributes -rw-r--r-- 260 bytes
.gitignore -rw-r--r-- 1.5 KB
.gitmodules -rw-r--r-- 0 bytes
.golangci.yaml -rw-r--r-- 3.3 KB
.mailmap -rw-r--r-- 3.5 KB
.travis.yml -rw-r--r-- 1.1 KB
AUTHORS -rw-r--r-- 18.8 KB
CODEOWNERS -rw-r--r-- 12.5 KB
CODE_OF_CONDUCT.md -rw-r--r-- 2.2 KB
CONTRIBUTING.md -rw-r--r-- 227 bytes
FURTHER_READINGS.rst -rw-r--r-- 4.9 KB
GO_VERSION -rw-r--r-- 7 bytes
LICENSE -rw-r--r-- 11.1 KB
MAINTAINERS.md -rw-r--r-- 3.6 KB
Makefile -rw-r--r-- 27.6 KB
Makefile.defs -rw-r--r-- 6.0 KB
Makefile.docker -rw-r--r-- 6.1 KB
Makefile.quiet -rw-r--r-- 718 bytes
README.rst -rw-r--r-- 15.1 KB
SECURITY.md -rw-r--r-- 615 bytes
USERS.md -rw-r--r-- 7.0 KB
VERSION -rw-r--r-- 8 bytes
Vagrantfile -rw-r--r-- 12.8 KB
go.mod -rw-r--r-- 5.4 KB
go.sum -rw-r--r-- 140.2 KB
netlify.toml -rw-r--r-- 92 bytes
stable.txt -rw-r--r-- 8 bytes
vagrant_box_defaults.rb -rw-r--r-- 392 bytes

README.rst

back to top