Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fqdn: Fix Restore Check Logic #31784

Merged
merged 1 commit into from
Apr 5, 2024

Conversation

nathanjsweet
Copy link
Member

Sometimes restored IPRules do not have the
default "nil" populating their IP maps, but
instead have an empty map structure.
We need to check for this restore possibility.

fqdn: Fix minor restore bug that causes false negative checks against a restored DNS IP map.

@nathanjsweet nathanjsweet added the release-note/bug This PR fixes an issue in a previous release of Cilium. label Apr 5, 2024
@nathanjsweet nathanjsweet requested a review from a team as a code owner April 5, 2024 01:07
@nathanjsweet nathanjsweet added needs-backport/1.13 This PR / issue needs backporting to the v1.13 branch needs-backport/1.14 This PR / issue needs backporting to the v1.14 branch needs-backport/1.15 This PR / issue needs backporting to the v1.15 branch labels Apr 5, 2024
@maintainer-s-little-helper maintainer-s-little-helper bot added this to Needs backport from main in 1.15.4 Apr 5, 2024
@maintainer-s-little-helper maintainer-s-little-helper bot added this to Needs backport from main in 1.14.10 Apr 5, 2024
@maintainer-s-little-helper maintainer-s-little-helper bot added this to Needs backport from main in 1.13.15 Apr 5, 2024
Copy link
Member

@pippolo84 pippolo84 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just out of curiosity, what's the path that leads to an empty map instead of a nil one?

pkg/fqdn/dnsproxy/proxy.go Outdated Show resolved Hide resolved
Sometimes restored IPRules do not have the
default "nil" populating their IP maps, but instead have
an empty map structure. We need to check for this
restore possibility.

Signed-off-by: Nate Sweet <nathanjsweet@pm.me>
@nathanjsweet nathanjsweet force-pushed the pr/nathanjsweet/fix-fqdn-proxy-restore-check branch from 1822474 to 91b5d6a Compare April 5, 2024 15:42
@nathanjsweet
Copy link
Member Author

/test

Copy link
Member

@pippolo84 pippolo84 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 💯

@nathanjsweet
Copy link
Member Author

Just out of curiosity, what's the path that leads to an empty map instead of a nil one?

This is using the library for another project. Given that the restore objects can be marshalled in and out of various data formats (like JSON, for example) this is good code hygiene.

@nathanjsweet nathanjsweet added this pull request to the merge queue Apr 5, 2024
Merged via the queue into main with commit 79029db Apr 5, 2024
249 checks passed
@nathanjsweet nathanjsweet deleted the pr/nathanjsweet/fix-fqdn-proxy-restore-check branch April 5, 2024 20:27
@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 Apr 5, 2024
@nathanjsweet nathanjsweet added backport-pending/1.15 The backport for Cilium 1.15.x for this PR is in progress. and removed needs-backport/1.15 This PR / issue needs backporting to the v1.15 branch labels Apr 9, 2024
@maintainer-s-little-helper maintainer-s-little-helper bot moved this from Needs backport from main to Backport pending to v1.15 in 1.15.4 Apr 9, 2024
@maintainer-s-little-helper maintainer-s-little-helper bot moved this from Needs backport from main to Backport pending to v1.15 in 1.15.4 Apr 9, 2024
@nathanjsweet nathanjsweet added backport-pending/1.13 The backport for Cilium 1.13.x for this PR is in progress. backport-pending/1.14 The backport for Cilium 1.14.x for this PR is in progress. and removed needs-backport/1.13 This PR / issue needs backporting to the v1.13 branch needs-backport/1.14 This PR / issue needs backporting to the v1.14 branch labels Apr 9, 2024
@maintainer-s-little-helper maintainer-s-little-helper bot moved this from Needs backport from main to Backport pending to v1.14 in 1.14.10 Apr 9, 2024
@maintainer-s-little-helper maintainer-s-little-helper bot moved this from Needs backport from main to Backport pending to v1.13 in 1.13.15 Apr 9, 2024
@asauber asauber added this to Backport pending to v1.13 in 1.13.16 Apr 11, 2024
@asauber asauber removed this from Backport pending to v1.13 in 1.13.15 Apr 11, 2024
@asauber asauber added this to Backport pending to v1.15 in 1.15.5 Apr 11, 2024
@asauber asauber removed this from Backport pending to v1.15 in 1.15.4 Apr 11, 2024
@asauber asauber added this to Backport pending to v1.14 in 1.14.11 Apr 11, 2024
@asauber asauber removed this from Backport pending to v1.14 in 1.14.10 Apr 11, 2024
@julianwiedmann
Copy link
Member

Backported with #31872, #31871, #31870

@julianwiedmann julianwiedmann added backport-done/1.13 The backport for Cilium 1.13.x for this PR is done. backport-done/1.14 The backport for Cilium 1.14.x for this PR is done. backport-done/1.15 The backport for Cilium 1.15.x for this PR is done. area/fqdn Affects the FQDN policies feature and removed backport-pending/1.13 The backport for Cilium 1.13.x for this PR is in progress. backport-pending/1.14 The backport for Cilium 1.14.x for this PR is in progress. backport-pending/1.15 The backport for Cilium 1.15.x for this PR is in progress. labels May 3, 2024
@nebril nebril moved this from Backport pending to v1.13 to Backport done to v1.13 in 1.13.16 May 10, 2024
@nebril nebril moved this from Backport pending to v1.14 to Backport done to v1.14 in 1.14.11 May 10, 2024
@nebril nebril moved this from Backport pending to v1.15 to Backport done to v1.15 in 1.15.5 May 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/fqdn Affects the FQDN policies feature backport-done/1.13 The backport for Cilium 1.13.x for this PR is done. backport-done/1.14 The backport for Cilium 1.14.x for this PR is done. backport-done/1.15 The backport for Cilium 1.15.x for this PR is done. ready-to-merge This PR has passed all tests and received consensus from code owners to merge. release-note/bug This PR fixes an issue in a previous release of Cilium.
Projects
No open projects
1.13.16
Backport done to v1.13
1.14.11
Backport done to v1.14
1.15.5
Backport done to v1.15
Development

Successfully merging this pull request may close these issues.

None yet

3 participants