Skip to content

Conversation

gandro
Copy link
Member

@gandro gandro commented Nov 13, 2024

Once this PR is merged, a GitHub action will update the labels of these PRs:

 33230

This is a release blocker because the referenced commit has been backported to v1.15

[ upstream commit fb7e01b ]

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: d11e4d2 ("proxy: Reuse proxy ports from datapath on restart")

Signed-off-by: Sebastian Wicki <sebastian@isovalent.com>
@gandro gandro added kind/backports This PR provides functionality previously merged into master. backport/1.15 This PR represents a backport for Cilium 1.15.x of a PR that was merged to main. labels Nov 13, 2024
@gandro gandro changed the title v1.15 Backports 2024-11-13 [v1.15] fqdn: Skip "open ports" check for statically configured ports Nov 13, 2024
@gandro gandro marked this pull request as ready for review November 13, 2024 09:00
@gandro gandro requested a review from a team as a code owner November 13, 2024 09:01
@gandro
Copy link
Member Author

gandro commented Nov 13, 2024

/test-backport-1.15

@maintainer-s-little-helper maintainer-s-little-helper bot added the ready-to-merge This PR has passed all tests and received consensus from code owners to merge. label Nov 13, 2024
@gandro gandro merged commit 8d71ff0 into cilium:v1.15 Nov 13, 2024
62 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport/1.15 This PR represents a backport for Cilium 1.15.x of a PR that was merged to main. kind/backports This PR provides functionality previously merged into master. ready-to-merge This PR has passed all tests and received consensus from code owners to merge.
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants