Skip to content

Conversation

@victory460
Copy link

To avoid crashes when new_route->mtu = port->mtu;

    avoid crashes when new_route->mtu = port->mtu;

Signed-off-by: xuweiwei_yewu <[email protected]>
@ytwang0320 ytwang0320 requested a review from Copilot September 4, 2025 11:42
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds null pointer validation for the port parameter in the route_new_entry function to prevent potential crashes when accessing port->mtu. The change enhances defensive programming by ensuring both dest and port parameters are validated before proceeding with route entry creation.

  • Added null check for port parameter alongside existing dest validation

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Copy link
Collaborator

@ytwang0320 ytwang0320 left a comment

Choose a reason for hiding this comment

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

approve +1

@ytwang0320 ytwang0320 added the pr/codes-reviewed-ok code review passed and no problem found label Sep 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr/codes-reviewed-ok code review passed and no problem found

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants