Skip to content

Commit

Permalink
fix(bgp_policy): allow for statement add / remove
Browse files Browse the repository at this point in the history
The previous version of the bgp_policies code only allowed for creating
a policy when the policy didn't exist already. However, with the advent
of dual-stack we need to be able to add / remove statements if we add or
lose a specific IP family (e.g. IPv4 or IPv6) since they are handled in
different statements.

Given that the owner of GoBGP has let us know that policies are
idempotent, this now involves quite a bit of work. We need to follow the
following procedure:

add statements if missing -> add them to a policy -> if policy doesn't
  equal the one already in GoBGP -> create the new policy and associate
  it -> de-associate the old policy -> remove the old policy
  • Loading branch information
aauren committed Oct 7, 2023
1 parent 1d5c9ce commit 384ed97
Show file tree
Hide file tree
Showing 3 changed files with 311 additions and 92 deletions.
Loading

0 comments on commit 384ed97

Please sign in to comment.