Automatic merge from release/2.1.0 -> release/2.2.0

* commit 'f32205086eb864ad82526162f1287b96828098c2':
  protocol为空则指定protocol为any
This commit is contained in:
邱剑
2018-09-10 23:53:54 +08:00
+2 -2
View File
@@ -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 {