Fix/gobgp legacy withdraw #631
DeletePath still returns "uuid is required" when uuid is empty, so
#616 is not fixed.
GoBGP's DeletePath handles three cases:
| uuid | path | Action |
|---|---|---|
| set | (ignored) | Delete the path with this UUID |
| empty | set | Delete the given path |
| empty | not set | Delete all local paths (in family if set) |
#616 needs the second case. gobgp global rib del <prefix> also sends
this request. Please implement it in DeletePath.
The flags are not checked. For example, ORIGIN with flags 0xe0 is
accepted and then advertised to peers with these flags.
GoBGP rejects such a request (validatePathAttributeFlags()). Could you
do the same check here, like the UPDATE parser does with
canonical_flags()? A test case for it would be good too.
Requested changes.
Sorry forgot to publish 2 more commits, will fix now
Done
Merged, thanks.
fujita
nuclearcat
Adding support of GoBGP binary NLRI and attribute fields and supports withdrawals through both legacy
AddPathwithis_withdraw = trueand UUID-freeDeletePath. GoBGP CLIrib delnow works for IPv4, IPv6, FlowSpec, path identifiers, and VRF paths.global rib del allwithdraws 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
DeletePathremains 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 withgobgp global rib del 198.51.100.42/32. No UUID state is needed. Usegobgp global rib del all -a ipv4to remove all local IPv4 paths. Programmatic clients can callDeletePathwith aPathcontaining the same family, NLRI, and identifier used for the announcement.Fixes: https://github.com/osrg/rustybgp/issues/616.
Did you use an AI tool?
Assisted-by: Codex AI