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{
663
663
{
664
664
StructField : "VPCCIDR" ,
665
665
StringPtrValidation : & cr.StringPtrValidation {
666
- Validator : validateCIDR ,
666
+ Validator : validateVPCCIDR ,
667
667
},
668
668
},
669
669
}
@@ -1470,6 +1470,15 @@ func (ng *NodeGroup) FillEmptySpotFields(region string) {
1470
1470
}
1471
1471
1472
1472
func 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 ) {
1473
1482
_ , network , err := net .ParseCIDR (cidr )
1474
1483
if err != nil {
1475
1484
return "" , errors .WithStack (err )
You can’t perform that action at this time.
0 commit comments