Skip to content

Fix/gobgp legacy withdraw - #631

Open
nuclearcat wants to merge 2 commits into
osrg:masterfrom
nuclearcat:fix/gobgp-legacy-withdraw
Open

nuclearcat wants to merge 2 commits into
osrg:masterfrom
nuclearcat:fix/gobgp-legacy-withdraw

Conversation

@nuclearcat

Copy link
Copy Markdown
Contributor

Adding support of GoBGP binary NLRI and attribute fields and supports withdrawals through both legacy AddPath with is_withdraw = true and UUID-free DeletePath. GoBGP CLI rib del now works for IPv4, IPv6, FlowSpec, path identifiers, and VRF paths. global rib del all withdraws locally injected routes in the selected address family while preserving peer and kernel routes.

Withdrawals identify a local path by NLRI and path identifier. Withdrawing an absent path succeeds silently, matching GoBGP. Removed UUID handles are invalidated so they cannot delete a later announcement. UUID-based DeletePath remains supported and takes precedence over path and bulk selectors. VRF path deletions are translated to the VRF's exported VPN NLRI; bulk VRF deletions are scoped by RD and export label.

The real GoBGP v4.8.0 CLI passed the new CLI-only end-to-end test, including repeated withdrawals, multiple path identifiers, family-scoped bulk deletion, FlowSpec, and VRF isolation.

For example, after gobgp global rib add 198.51.100.42/32, withdraw it with gobgp global rib del 198.51.100.42/32. No UUID state is needed. Use gobgp global rib del all -a ipv4 to remove all local IPv4 paths. Programmatic clients can call DeletePath with a Path containing the same family, NLRI, and identifier used for the announcement.

Fixes: #616.

Did you use an AI tool?

Assisted-by: Codex AI

Accept the public GoBGP v4 binary NLRI and attribute fields while preserving structured requests. Validate binary input before installing routes.

Assisted-by: OpenAI Codex
Signed-off-by: Denys Fedoryshchenko <denys.f@collabora.com>
Support withdrawal by NLRI through AddPath and invalidate removed UUID handles. Retain UUID-based DeletePath and isolate unrelated paths.

Assisted-by: OpenAI Codex
Signed-off-by: Denys Fedoryshchenko <denys.f@collabora.com>
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.

Feature Request: Allow DeletePath by Path Without Requiring UUID

1 participant