mirror of
https://github.com/apache/cloudstack.git
synced 2025-11-02 11:52:28 +01:00
CLOUDSTACK-7728: Fixed adding icmp rules with different types and codes
This commit is contained in:
parent
080bc2e2e9
commit
f488a8f72c
@ -406,7 +406,7 @@ public class FirewallManagerImpl extends ManagerBase implements FirewallService,
|
||||
(newRule.getSourcePortStart() != null && newRule.getSourcePortEnd() != null && rule.getSourcePortStart() != null && rule.getSourcePortEnd() != null);
|
||||
boolean nullPorts =
|
||||
(newRule.getSourcePortStart() == null && newRule.getSourcePortEnd() == null && rule.getSourcePortStart() == null && rule.getSourcePortEnd() == null);
|
||||
if(nullPorts && duplicatedCidrs && (rule.getProtocol().equalsIgnoreCase(newRule.getProtocol())))
|
||||
if(nullPorts && duplicatedCidrs && (rule.getProtocol().equalsIgnoreCase(newRule.getProtocol())) && !newRule.getProtocol().equalsIgnoreCase(NetUtils.ICMP_PROTO))
|
||||
{
|
||||
throw new NetworkRuleConflictException("There is already a firewall rule specified with protocol = " +newRule.getProtocol()+ " and no ports");
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user