Skip to content

Avoid XfrmPolicyList return nil data. - #2122

Closed
yanggangtony wants to merge 1 commit into
submariner-io:develfrom
yanggangtony:code-clean
Closed

yanggangtony wants to merge 1 commit into
submariner-io:develfrom
yanggangtony:code-clean

Conversation

@yanggangtony

Copy link
Copy Markdown
Contributor

Signed-off-by: yanggang gang.yang@daocloud.io

Avoid xfrmPolicyList interface return nil data to crash the golang.

@submariner-bot

Copy link
Copy Markdown
Contributor

🤖 Created branch: z_pr2122/yanggangtony/code-clean
🚀 Full E2E won't run until the "ready-to-test" label is applied. I will add it automatically once the PR has 2 approvals, or you can add it manually.

Signed-off-by: yanggang <gang.yang@daocloud.io>
Comment thread pkg/netlink/netlink.go Resolved

@skitt skitt left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This isn’t necessary, (*IPNet).String() handles nil references correctly. Dst or Src being nil won’t cause a panic.

@yanggangtony

Copy link
Copy Markdown
Contributor Author

This isn’t necessary, (*IPNet).String() handles nil references correctly. Dst or Src being nil won’t cause a panic.

@skitt
Thanks for review and give advice..
I just test the code .Its fine..
So just close the pr..

@submariner-bot

Copy link
Copy Markdown
Contributor

🤖 Closed branches: [z_pr2122/yanggangtony/code-clean]

@yanggangtony
yanggangtony deleted the code-clean branch November 14, 2022 12:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants