Skip to content

Commit

Permalink
[api] vpc subnet dhcp mtu should be >= 96
Browse files Browse the repository at this point in the history
  • Loading branch information
Frostman committed Aug 28, 2024
1 parent 1700b95 commit 16ced20
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions api/vpc/v1alpha2/vpc_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -417,6 +417,9 @@ func (vpc *VPC) Validate(ctx context.Context, kube client.Reader, fabricCfg *met
}
}

if subnetCfg.DHCP.Options.InterfaceMTU < 96 {
return nil, errors.Errorf("subnet %s: MTU cannot be set smaller than 96", subnetName)
}
if subnetCfg.DHCP.Options.InterfaceMTU > 9036 {
return nil, errors.Errorf("subnet %s: MTU cannot be set greater than 9036", subnetName)
}
Expand Down

0 comments on commit 16ced20

Please sign in to comment.