bgpd: preserve cli configured VPN export RT on router-id update#22603
Open
kaffarell wants to merge 1 commit into
Open
bgpd: preserve cli configured VPN export RT on router-id update#22603kaffarell wants to merge 1 commit into
kaffarell wants to merge 1 commit into
Conversation
`rt vpn both` is stored internally as separate import and export RT lists. On router-id updates, bgpd re-derives the VPN RD/RT and overwrites the export RT with an RT derived from the current export RD. This broke configurations such as: rd vpn export 65000:6 rt vpn both 65000:100 After a router-id update, the import RT stayed `65000:100`, but the export RT was replaced with `65000:6`. The running config then appeared as split import/export RTs and VPN import matching no longer worked as configured. Add a "CLI set" flag for the VPN export RT, set/clear it from the RT CLI, and skip automatic export RT derivation when the export RT was explicitly configured. Also do the same thing to the VRF-to-VRF auto RT setup and last-unimport cleanup, so explicit (cli-set) RT/RD values survive removing and re-adding `import vrf`. Note that the router-id import-vrf RT refresh still removes only the first RT value before merging the current export RT list. This behavior already existed beforehand (the old code also removed `ecom->val` only) so I left it unchanged. Fixes: FRRouting#22579 Signed-off-by: Gabriel Goller <g.goller@proxmox.com>
Greptile SummaryThis PR preserves manually configured VPN export RTs across bgpd refresh paths. The main changes are:
Confidence Score: 5/5This looks safe to merge.
Important Files Changed
Reviews (1): Last reviewed commit: "bgpd: preserve cli configured VPN export..." | Re-trigger Greptile |
Contributor
|
LGTM |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
rt vpn bothis stored internally as separate import and export RT lists. On router-id updates, bgpd re-derives the VPN RD/RT and overwrites the export RT with an RT derived from the current export RD.This broke configurations such as:
After a router-id update, the import RT stayed
65000:100, but the export RT was replaced with65000:6. The running config then appeared as split import/export RTs and VPN import matching no longer worked as configured.Add a "CLI set" flag for the VPN export RT, set/clear it from the RT CLI, and skip automatic export RT derivation when the export RT was explicitly configured. Also do the same thing to the VRF-to-VRF auto RT setup and last-unimport cleanup, so explicit (cli-set) RT/RD values survive removing and re-adding
import vrf.Note that the router-id import-vrf RT refresh still removes only the first RT value before merging the current export RT list. This behavior already existed beforehand (the old code also removed
ecom->valonly) so I left it unchanged.Fixes: #22579