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

Automated cherry pick of #6077: Fix nil pointer dereference when ClusterGroup/Group is used #6086

Conversation

tnqn
Copy link
Member

@tnqn tnqn commented Mar 8, 2024

Cherry pick of #6077 on release-1.15.

#6077: Fix nil pointer dereference when ClusterGroup/Group is used

For details on the cherry pick process, see the cherry pick requests page.

…o#6077)

When an AppliedToGroup or AddressGroup is derived from a ClusterGroup or
Group, we used the existence of the source Group in the internal group
storage as the indicator of the type of AppliedToGroup or AddressGroup.
After the source Group is deleted, the AppliedToGroup or AddressGroup
was considered as a Group with its own selector mistakenly. Accessing
its selector would panic due to nil pointer dereference.

This patch makes the type of AppliedToGroup and AddressGroup more
explicit by adding a field "SourceGroup" to indicate it. If the source
Group can't be found in the storage, we just return nil to indicate the
Group selects nothing at the moment.

Signed-off-by: Quan Tian <qtian@vmware.com>
@tnqn tnqn added the kind/cherry-pick Categorizes issue or PR as related to the cherry-pick of a bug fix from the main branch to a release label Mar 8, 2024
@tnqn
Copy link
Member Author

tnqn commented Mar 11, 2024

/skip-all

@tnqn tnqn merged commit f899dd0 into antrea-io:release-1.15 Mar 11, 2024
47 of 51 checks passed
@tnqn tnqn deleted the automated-cherry-pick-of-#6077-upstream-release-1.15 branch March 11, 2024 02:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/cherry-pick Categorizes issue or PR as related to the cherry-pick of a bug fix from the main branch to a release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants