Skip to content

Add large community auto-append for standard communities#1

Open
judsd wants to merge 2 commits into
mainfrom
claude/add-large-communities-support-a2Wix
Open

Add large community auto-append for standard communities#1
judsd wants to merge 2 commits into
mainfrom
claude/add-large-communities-support-a2Wix

Conversation

@judsd
Copy link
Copy Markdown
Member

@judsd judsd commented May 11, 2026

[NF] Add automatic large community generation from standard communities

This change implements automatic appending of large communities when corresponding standard communities are detected in BGP route filtering.

Changes:

  • Added logic to detect standard communities with ASNs 65501, 65502, and 65503
  • Implements two variants:
    • Per-peer variant: Standard communities (65501|65502|65503, peer) automatically generate large communities (routeserverasn, 65501|65502|65503, peer)
    • All-peers variant: Standard communities (routeserverasn, 65501|65502|65503) automatically generate large communities (routeserverasn, 65501|65502|65503, 1|2|3) respectively
  • Updated the BIRD2 configuration template to conditionally include this logic when bgp_lc is enabled on the router
  • Updated all known-good CI configuration files to reflect the new behavior

Test Plan:

Existing CI tests will validate the generated BIRD2 configurations match the known-good files. The feature is conditionally enabled via the bgp_lc router flag, allowing gradual rollout.

In addition to the above, I have:

  • ensured unit tests all run without error
  • ran psalm and corrected any static analysis issues
  • ensured all relevant template output is escaped to avoid XSS attached with <?= $t->ee( $data ) ?> or equivalent
  • ensured appropriate checks against user privilege / resources accessed
  • API calls (particular for add/edit/delete/toggle) are not implemented with GET and use CSRF tokens to avoid CSRF attacks

https://claude.ai/code/session_01HtrfR9ru1jcNPwbFET6An6

claude added 2 commits May 11, 2026 14:54
When a peer sends standard BGP communities in the 65501/65502/65503 range
(used to signal prepend once/twice/thrice), the bird2 route server import
filter now automatically appends the corresponding large community using
the route server's ASN as the first element. This lets a single policy
toolchain handle both standard and large community variants.

https://claude.ai/code/session_01HtrfR9ru1jcNPwbFET6An6
…ding

Extends ixp_community_filter() so the large communities appended by the
previous commit actually trigger AS-path prepending. Each existing 101/
102/103 branch now also matches the corresponding 65501/65502/65503
variant for both per-peer and all-peers cases.

https://claude.ai/code/session_01HtrfR9ru1jcNPwbFET6An6
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.

2 participants