Skip to content

Conversation

gandro
Copy link
Member

@gandro gandro commented Nov 11, 2024

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

 33230

[ 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.14 This PR represents a backport for Cilium 1.14.x of a PR that was merged to main. labels Nov 11, 2024
@gandro gandro marked this pull request as ready for review November 11, 2024 11:18
@gandro gandro requested a review from a team as a code owner November 11, 2024 11:18
@gandro gandro changed the title v1.14 Backports 2024-11-11 [v1.14] fqdn: Skip "open ports" check for statically configured ports Nov 11, 2024
@gandro
Copy link
Member Author

gandro commented Nov 11, 2024

/test-backport-1.14

@gandro
Copy link
Member Author

gandro commented Nov 11, 2024

Marking as release blocker since this fixes a commit recently backported to v1.14

@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 11, 2024
@gandro gandro merged commit 382071f into cilium:v1.14 Nov 11, 2024
60 of 61 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport/1.14 This PR represents a backport for Cilium 1.14.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