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
.gitattributes
/install/kubernetes/cilium/values.yaml.tmpl linguist-language=yml
/install/kubernetes/cilium/values.yaml linguist-generated
/install/kubernetes/cilium/README.md linguist-generated
*.Jenkinsfile linguist-language=Groovy
go.sum linguist-generated
examples/kubernetes/connectivity-check/connectivity-*.yaml linguist-generated
pkg/k8s/apis/cilium.io/v2/client/crds/*.yaml linguist-generated
test/controlplane/**/v1.[0-9][0-9]/*.yaml linguist-generated
test/controlplane/services/graceful-termination/*.yaml linguist-generated
Documentation/cmdref/** linguist-generated
Documentation/crdlist.rst linguist-generated
Documentation/helm-values.rst linguist-generated
Documentation/codeowners.rst linguist-generated
Documentation/_static/* -diff
*svg -diff
pkg/k8s/client/clientset/** linguist-generated
pkg/k8s/client/informers/** linguist-generated
pkg/k8s/client/listers/** linguist-generated
![swh spinner](/static/img/swh-spinner.gif)
Computing file changes ...