Skip to content

Commit

Permalink
Remove the control for aggregation length v6 in native mode (#1220)
Browse files Browse the repository at this point in the history
In the operator crds we default the value to 128, so running the
operator in native mode will fail when we have advertisements. We
still check for not having v6 addresses in native mode, so the
users will still know if something is not working.

Signed-off-by: Federico Paolinelli <fpaoline@redhat.com>
  • Loading branch information
fedepaol committed Feb 15, 2022
1 parent 7b4f86a commit 602039e
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 25 deletions.
5 changes: 0 additions & 5 deletions internal/config/validate.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,6 @@ func DiscardFRROnly(c *configFile) error {
return errors.New("bfd profiles section set")
}
for _, p := range c.Pools {
for _, a := range p.BGPAdvertisements {
if a.AggregationLengthV6 != nil {
return fmt.Errorf("pool %s has aggregation-lenght-v6 set on native bgp mode", p.Name)
}
}
if p.Protocol == BGP {
for _, cidr := range p.Addresses {
nets, err := ParseCIDR(cidr)
Expand Down
20 changes: 0 additions & 20 deletions internal/config/validate_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,22 +63,6 @@ func TestValidate(t *testing.T) {
},
mustFail: true,
},
{
desc: "aggregation v6",
config: &configFile{
Pools: []addressPool{
{
Name: "foo",
BGPAdvertisements: []bgpAdvertisement{
{
AggregationLengthV6: intPtr(47),
},
},
},
},
},
mustFail: true,
},
{
desc: "should pass",
config: &configFile{
Expand Down Expand Up @@ -243,7 +227,3 @@ func TestValidateFRR(t *testing.T) {
})
}
}

func intPtr(i int) *int {
return &i
}

0 comments on commit 602039e

Please sign in to comment.