Skip to content

vrf: fix route filtering to preserve IPAM-configured routes#1227

Merged
squeed merged 1 commit intocontainernetworking:mainfrom
mlguerrero12:fixvrfglobalroutes
Feb 16, 2026
Merged

vrf: fix route filtering to preserve IPAM-configured routes#1227
squeed merged 1 commit intocontainernetworking:mainfrom
mlguerrero12:fixvrfglobalroutes

Conversation

@mlguerrero12
Copy link
Member

The previous implementation filtered out routes without an explicit source address (route.Src == nil), which incorrectly removed routes added by IPAM plugins. IPAM plugins typically configure routes without setting a source address, causing those routes to be lost when the interface was moved to the VRF.

The SCOPE_UNIVERSE filter already excludes local and connected routes that are automatically recreated by the kernel, so the additional route.Src filter was both unnecessary and harmful.

Fixes #1223

The previous implementation filtered out routes without an explicit
source address (route.Src == nil), which incorrectly removed routes
added by IPAM plugins. IPAM plugins typically configure routes without
setting a source address, causing those routes to be lost when the
interface was moved to the VRF.

The SCOPE_UNIVERSE filter already excludes local and connected routes
that are automatically recreated by the kernel, so the additional
route.Src filter was both unnecessary and harmful.

Fixes containernetworking#1223

Signed-off-by: Marcelo Guerrero <marcegue@cisco.com>
@squeed squeed self-requested a review February 16, 2026 15:23
@squeed squeed merged commit ccc8314 into containernetworking:main Feb 16, 2026
6 checks passed
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.

IPAM added routes incompatible with vrf plugin

2 participants