Skip to content

Commit

Permalink
Merge pull request #425 from gthiemonge/fix_routes_dst_cidr_mask
Browse files Browse the repository at this point in the history
Don't block CIDR masks other than 16/64
  • Loading branch information
openshift-merge-bot[bot] authored Dec 6, 2024
2 parents 62f16e4 + 8dd0023 commit 0de59b8
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions pkg/octavia/network_parameters.go
Original file line number Diff line number Diff line change
Expand Up @@ -135,18 +135,6 @@ func GetNetworkParametersFromNAD(
if len(nadConfig.IPAM.Routes) > 0 {
networkParameters.TenantCIDR = nadConfig.IPAM.Routes[0].Destination

// For IPv4, we require a /16 subnet, for IPv6 a /64
var bitlen int
if networkParameters.TenantCIDR.Addr().Is6() {
bitlen = 64
} else {
bitlen = 16
}

if networkParameters.TenantCIDR.Bits() != bitlen {
return nil, fmt.Errorf("the tenant CIDR is /%d, it should be /%d", networkParameters.TenantCIDR.Bits(), bitlen)
}

// Compute an allocation range based on the CIDR
start, end := GetRangeFromCIDR(networkParameters.TenantCIDR)
networkParameters.TenantAllocationStart = start
Expand Down

0 comments on commit 0de59b8

Please sign in to comment.