Revision fb7e01b4875cbb47b9c8cec8c4da3dfd96ba6490 authored by Sebastian Wicki on 18 June 2024, 10:24:34 UTC, committed by Sebastian Wicki on 19 June 2024, 14:03:48 UTC
When restoring the previous DNS proxy port, we check if the port is already in-use. However, if the port we retrieved from `GetProxyPort` was previously set via `SetProxyPort`, then we want to use it unconditionally. We rely on `isStatic` for this, as static ports cannot change and the open port may be open with `SO_REUSEPORT` (which `proxy.OpenLocalPorts()` does not check). Restored ports never have `isStatic` set to true, so this does retain the "open ports" check if the port was restored. In addition, when restoring ports we want to make sure that previous calls to `SetProxyPort` are also not overwritten, thus this commit also only restores the port if it wasn't explicitly set. This is the same behavior we had previously, which did not check the returned port of `d.l7Proxy.GetProxyPort` against the list of open ports. Fixes: d11e4d261279 ("proxy: Reuse proxy ports from datapath on restart") Signed-off-by: Sebastian Wicki <sebastian@isovalent.com>
1 parent 6aa4fa8
File | Mode | Size |
---|---|---|
.devcontainer | ||
.github | ||
.nvim | ||
.vscode | ||
Documentation | ||
api | ||
bpf | ||
bugtool | ||
cilium-dbg | ||
cilium-health | ||
clustermesh-apiserver | ||
contrib | ||
daemon | ||
examples | ||
hack | ||
hubble | ||
hubble-relay | ||
images | ||
install | ||
operator | ||
pkg | ||
plugins | ||
test | ||
tools | ||
vendor | ||
.authors.aux | -rw-r--r-- | 416 bytes |
.clang-format | -rw-r--r-- | 7.6 KB |
.clomonitor.yml | -rw-r--r-- | 984 bytes |
.gitattributes | -rw-r--r-- | 887 bytes |
.gitignore | -rw-r--r-- | 1.8 KB |
.golangci.yaml | -rw-r--r-- | 4.4 KB |
.mailmap | -rw-r--r-- | 6.9 KB |
AUTHORS | -rw-r--r-- | 52.1 KB |
CODEOWNERS | -rw-r--r-- | 28.2 KB |
CODE_OF_CONDUCT.md | -rw-r--r-- | 2.2 KB |
CONTRIBUTING.md | -rw-r--r-- | 691 bytes |
FURTHER_READINGS.rst | -rw-r--r-- | 6.4 KB |
LICENSE | -rw-r--r-- | 11.1 KB |
MAINTAINERS.md | -rw-r--r-- | 4.6 KB |
Makefile | -rw-r--r-- | 25.4 KB |
Makefile.defs | -rw-r--r-- | 7.5 KB |
Makefile.docker | -rw-r--r-- | 7.1 KB |
Makefile.kind | -rw-r--r-- | 16.8 KB |
Makefile.quiet | -rw-r--r-- | 818 bytes |
README.rst | -rw-r--r-- | 19.6 KB |
SECURITY-INSIGHTS.yml | -rw-r--r-- | 2.1 KB |
SECURITY.md | -rw-r--r-- | 1.0 KB |
USERS.md | -rw-r--r-- | 35.2 KB |
VERSION | -rw-r--r-- | 11 bytes |
Vagrantfile | -rw-r--r-- | 14.9 KB |
go.mod | -rw-r--r-- | 13.6 KB |
go.sum | -rw-r--r-- | 96.9 KB |
netlify.toml | -rw-r--r-- | 92 bytes |
stable.txt | -rw-r--r-- | 8 bytes |
vagrant_box_defaults.rb | -rw-r--r-- | 334 bytes |
![swh spinner](/static/img/swh-spinner.gif)
Computing file changes ...