mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-24 16:03:43 +08:00
Merge pull request #181 in YUNIONIO/onecloud from ~QUXUAN/onecloud:hotfix/qx-secgroup-rules to release/2.1.0
* commit '48ce6b7c0e78ee81f0d6b23ede1b49158b002e06': protocol为空则指定protocol为any
This commit is contained in:
@@ -374,8 +374,8 @@ func (manager *SSecurityGroupRuleManager) SyncRules(ctx context.Context, userCre
|
||||
|
||||
func (manager *SSecurityGroupRuleManager) newFromCloudSecurityGroup(rule secrules.SecurityRule, secgroup *SSecurityGroup) (*SSecurityGroupRule, error) {
|
||||
protocol := rule.Protocol
|
||||
if rule.Protocol == "any" {
|
||||
protocol = ""
|
||||
if len(protocol) == 0 {
|
||||
protocol = secrules.PROTO_ANY
|
||||
}
|
||||
ports, _ports := "", make([]string, len(rule.Ports))
|
||||
if len(rule.Ports) > 0 {
|
||||
|
||||
Reference in New Issue
Block a user