File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -663,7 +663,7 @@ var CoreConfigStructFieldValidations = []*cr.StructFieldValidation{
663663 {
664664 StructField : "VPCCIDR" ,
665665 StringPtrValidation : & cr.StringPtrValidation {
666- Validator : validateCIDR ,
666+ Validator : validateVPCCIDR ,
667667 },
668668 },
669669}
@@ -1470,6 +1470,15 @@ func (ng *NodeGroup) FillEmptySpotFields(region string) {
14701470}
14711471
14721472func validateCIDR (cidr string ) (string , error ) {
1473+ _ , _ , err := net .ParseCIDR (cidr )
1474+ if err != nil {
1475+ return "" , errors .WithStack (err )
1476+ }
1477+
1478+ return cidr , nil
1479+ }
1480+
1481+ func validateVPCCIDR (cidr string ) (string , error ) {
14731482 _ , network , err := net .ParseCIDR (cidr )
14741483 if err != nil {
14751484 return "" , errors .WithStack (err )
You can’t perform that action at this time.
0 commit comments