run hack/update-netparse-cve.sh

Kubernetes-commit: 0cd75e8fec62a2531637e80bb950ac9983cac1b0
This commit is contained in:
Antonio Ojea
2021-08-20 01:16:14 +02:00
committed by Kubernetes Publisher
parent 9c45b4b2bf
commit a6edfabde7
4 changed files with 15 additions and 11 deletions

View File

@@ -33,6 +33,7 @@ import (
"time"
"k8s.io/client-go/util/keyutil"
netutils "k8s.io/utils/net"
)
const duration365d = time.Hour * 24 * 365
@@ -157,7 +158,7 @@ func GenerateSelfSignedCertKeyWithFixtures(host string, alternateIPs []net.IP, a
BasicConstraintsValid: true,
}
if ip := net.ParseIP(host); ip != nil {
if ip := netutils.ParseIPSloppy(host); ip != nil {
template.IPAddresses = append(template.IPAddresses, ip)
} else {
template.DNSNames = append(template.DNSNames, host)