Merge pull request #15347 from justinsb/gce_icmpv6

gce: fix icmpv6 in firewalls
This commit is contained in:
Kubernetes Prow Robot 2023-04-25 23:06:15 -07:00 committed by GitHub
commit 2875f70cb5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 9 additions and 0 deletions

View File

@ -198,5 +198,14 @@ func (b *GCEModelContext) AddFirewallRulesTasks(c *fi.CloudupModelBuilderContext
ipv6.Disabled = true
ipv6.SourceRanges = []string{"::/0"}
}
var ipv6Allowed []string
for _, allowed := range ipv6.Allowed {
// Map icmp to icmpv6; easier than maintaining separate lists
if allowed == "icmp" {
allowed = "58" // 58 == the IANA protocol number for ICMPv6
}
ipv6Allowed = append(ipv6Allowed, allowed)
}
ipv6.Allowed = ipv6Allowed
c.AddTask(&ipv6)
}