Skip to content

bgp: T8588: Add match src-peer to policy route-map#5149

Open
robinchrist wants to merge 1 commit intovyos:currentfrom
robinchrist:T8588-bgp-route-map-src-peer
Open

bgp: T8588: Add match src-peer to policy route-map#5149
robinchrist wants to merge 1 commit intovyos:currentfrom
robinchrist:T8588-bgp-route-map-src-peer

Conversation

@robinchrist
Copy link
Copy Markdown
Contributor

Change summary

This PR adds match src-peer to policy route-map and makes some adjustments to list_bgp_neighbor.sh in order that it can be re-used for autocompletion of match src-peer

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes)
  • Migration from an old Vyatta component to vyos-1x, please link to related PR inside obsoleted component
  • Other (please describe):

Related Task(s)

https://vyos.dev/T8588

Related PR(s)

How to test / Smoketest result

vyos@vyos-test01# set policy route-map test1 rule 1 match src-peer HOST 
[edit]
vyos@vyos-test01# commit
[edit]
vyos@vyos-test01# cat /etc/frr/frr.conf
frr version 10.5.2
frr defaults datacenter
hostname vyos-test01
log syslog notifications
log timestamp precision 3
no log unique-id
service integrated-vtysh-config
!
route-map test1 permit 1
 match evpn route-type es
 match src-peer HOST
exit

vyos@vyos-test01# set policy route-map test1 rule 1 match src-peer fde6:aee:7995:0001::1 
[edit]
vyos@vyos-test01# commit
[edit]
vyos@vyos-test01# cat /etc/frr/frr.conf
frr version 10.5.2
frr defaults datacenter
hostname vyos-test01
log syslog notifications
log timestamp precision 3
no log unique-id
service integrated-vtysh-config
!
route-map test1 permit 1
 match evpn route-type es
 match src-peer fde6:aee:7995:1::1
exit

Checklist:

  • I have read the CONTRIBUTING document
  • I have linked this PR to one or more Phabricator Task(s)
  • I have run the components SMOKETESTS if applicable
  • My commit headlines contain a valid Task id
  • My change requires a change to the documentation
  • I have updated the documentation accordingly

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 27, 2026

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: d06485c6-d5e5-4842-93f9-7b8ff276fac1

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
✨ Simplify code
  • Create PR with simplified code

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions
Copy link
Copy Markdown

👍
No issues in PR Title / Commit Title

@github-actions
Copy link
Copy Markdown

✅ No typos found in changed files.

@github-actions
Copy link
Copy Markdown

CI integration ❌ failed!

Details

CI logs

  • CLI Smoketests 👍 passed
  • CLI Smoketests (interfaces only) ❌ failed
  • Config tests 👍 passed
  • RAID1 tests 👍 passed
  • CLI Smoketests VPP ❌ failed
  • Config tests VPP 👍 passed
  • TPM tests ❌ failed

Copy link
Copy Markdown
Member

@dmbaturin dmbaturin left a comment

Choose a reason for hiding this comment

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

The idea and the logic all look good to me. I left a simple suggestion about the command naming style.

</constraint>
</properties>
</leafNode>
<leafNode name="src-peer">
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.

We generally prefer not to abbreviate words in commands.

Suggested change
<leafNode name="src-peer">
<leafNode name="source-peer">

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I can change that, sure.

I wanted to keep it in sync with FRR (FRR calls it src-peer in the route-map), but if source-peer is preferred no problem :)

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.

Use the source-peer option

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Development

Successfully merging this pull request may close these issues.

3 participants