mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-24 16:03:43 +08:00
Automatic merge from release/2.3.0 -> release/2.4.0
* commit 'd25457892e522e6eee2cb9fa8c0a5387e304a53c': 避免PortStart为-1时未正确设置PortRange参数
This commit is contained in:
@@ -248,7 +248,7 @@ func (self *SRegion) modifySecurityGroupRule(secGrpId string, rule *secrules.Sec
|
||||
protocol = "all"
|
||||
}
|
||||
params["IpProtocol"] = protocol
|
||||
if rule.PortStart == 0 && rule.PortEnd == 0 {
|
||||
if rule.PortStart < 1 && rule.PortEnd < 1 {
|
||||
if protocol == "udp" || protocol == "tcp" {
|
||||
params["PortRange"] = "1/65535"
|
||||
} else {
|
||||
@@ -320,7 +320,7 @@ func (self *SRegion) addSecurityGroupRule(secGrpId string, rule *secrules.Securi
|
||||
protocol = "all"
|
||||
}
|
||||
params["IpProtocol"] = protocol
|
||||
if rule.PortStart == 0 && rule.PortEnd == 0 {
|
||||
if rule.PortStart < 1 && rule.PortEnd < 1 {
|
||||
if protocol == "udp" || protocol == "tcp" {
|
||||
params["PortRange"] = "1/65535"
|
||||
} else {
|
||||
@@ -363,7 +363,7 @@ func (self *SRegion) delSecurityGroupRule(secGrpId string, rule *secrules.Securi
|
||||
protocol = "all"
|
||||
}
|
||||
params["IpProtocol"] = protocol
|
||||
if rule.PortStart == 0 && rule.PortEnd == 0 {
|
||||
if rule.PortStart < 1 && rule.PortEnd < 1 {
|
||||
if protocol == "udp" || protocol == "tcp" {
|
||||
params["PortRange"] = "1/65535"
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user