mirror of
https://github.com/siderolabs/talos.git
synced 2025-08-18 04:27:06 +02:00
fix: don't extract nil IPs in the GCP platform
This fix is same as #4152. Signed-off-by: Andrey Smirnov <andrey.smirnov@talos-systems.com>
This commit is contained in:
parent
ba169c6f91
commit
c4048e263d
@ -100,7 +100,9 @@ func (g *GCP) ExternalIPs(ctx context.Context) (addrs []net.IP, err error) {
|
|||||||
|
|
||||||
for _, networkInterface := range m {
|
for _, networkInterface := range m {
|
||||||
for _, accessConfig := range networkInterface.AccessConfigs {
|
for _, accessConfig := range networkInterface.AccessConfigs {
|
||||||
addrs = append(addrs, net.ParseIP(accessConfig.ExternalIP))
|
if addr := net.ParseIP(accessConfig.ExternalIP); addr != nil {
|
||||||
|
addrs = append(addrs, addr)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user