From b2b415ed49989aa9fd352087f5e179d868774902 Mon Sep 17 00:00:00 2001 From: Jian Qiu Date: Fri, 24 May 2024 10:50:10 +0800 Subject: [PATCH] fix: secgroup init rule CIDR should be empty for both ipv4 and ipv6 (#20348) Co-authored-by: Qiu Jian --- pkg/compute/models/secgroups.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkg/compute/models/secgroups.go b/pkg/compute/models/secgroups.go index ab769090a0..f69b3091b1 100644 --- a/pkg/compute/models/secgroups.go +++ b/pkg/compute/models/secgroups.go @@ -829,7 +829,8 @@ func (manager *SSecurityGroupManager) InitializeData() error { defRule.Direction = secrules.DIR_IN defRule.Protocol = secrules.PROTO_ANY defRule.Priority = 1 - defRule.CIDR = "0.0.0.0/0" + // empty CIDR means ::/0 or 0.0.0.0/0 + defRule.CIDR = "" // "0.0.0.0/0" defRule.Action = string(secrules.SecurityRuleAllow) defRule.SecgroupId = api.SECGROUP_DEFAULT_ID err = SecurityGroupRuleManager.TableSpec().Insert(context.TODO(), &defRule)