Skip to content

Conversation

@anish-n
Copy link
Contributor

@anish-n anish-n commented Nov 14, 2025

…on default vnet

What I did

Why I did it

How I verified it

Details if related

@mssonicbld
Copy link
Collaborator

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@anish-n
Copy link
Contributor Author

anish-n commented Nov 14, 2025

/azp run

@azure-pipelines
Copy link

Commenter does not have sufficient privileges for PR 3995 in repo sonic-net/sonic-swss

@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Nov 17, 2025

CLA Not Signed

@mssonicbld
Copy link
Collaborator

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@anish-n anish-n marked this pull request as ready for review November 18, 2025 21:27
@anish-n anish-n requested a review from prsunny as a code owner November 18, 2025 21:27
Copilot AI review requested due to automatic review settings November 18, 2025 21:27
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 fixes a bug where route deletion operations in VNetOrch were incorrectly targeting routes in the default VRF instead of the intended VNet's VRF. The fix ensures that route existence checks and deletions are scoped to the correct VRF by passing the VRF ID as a parameter.

Key Changes:

  • Modified isRouteExists() to accept a VRF ID parameter instead of defaulting to the global virtual router ID
  • Updated all call sites in VNetOrch to pass the appropriate VRF ID when checking for route existence

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
orchagent/routeorch.h Updated function signature to include vrf_id parameter
orchagent/routeorch.cpp Removed hardcoded default VRF ID and used parameter instead
orchagent/vnetorch.cpp Updated all call sites to pass VRF ID to isRouteExists()

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +2504 to +2506

sai_object_id_t vr_id = vrf_obj->getVRidIngress();
if(gRouteOrch && gRouteOrch->isRouteExists(vr_id, ipPrefixsubnet))
Copy link

Copilot AI Nov 18, 2025

Choose a reason for hiding this comment

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

[nitpick] The variable vr_id is declared immediately before use in the conditional. Consider moving this declaration to the top of the relevant scope block for better readability and consistency with the pattern used at line 1195, where vr_id appears to be available from the surrounding context.

Copilot uses AI. Check for mistakes.
@anish-n anish-n force-pushed the vnetRtTunFixDfltVrfDel branch from 40a74b2 to fb55c5c Compare November 18, 2025 21:37
@mssonicbld
Copy link
Collaborator

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@anish-n anish-n marked this pull request as draft November 19, 2025 03:37
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.

3 participants