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

Commits on Mar 8, 2024

  1. Fix nil pointer dereference when ClusterGroup/Group is used (antrea-i…

    …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 <[email protected]>
    tnqn committed Mar 8, 2024
    Configuration menu
    Copy the full SHA
    85714bc View commit details
    Browse the repository at this point in the history