CLOUDSTACK-6927: Allow virtual router to be correctly cleaned from iptables

Virtual router never get a "-def" definition in iptables
This commit is contained in:
Loic Lambiel 2014-05-30 16:16:30 +02:00 committed by Sebastien Goasguen
parent f16fbc3c52
commit 9b33deb622
1 changed files with 1 additions and 1 deletions

View File

@ -538,7 +538,7 @@ def post_default_network_rules(vm_name, vm_id, vm_ip, vm_mac, vif, brname, dhcpS
logging.debug("Failed to log default network rules, ignoring")
def delete_rules_for_vm_in_bridge_firewall_chain(vmName):
vm_name = vmName
if vm_name.startswith('i-') or vm_name.startswith('r-'):
if vm_name.startswith('i-'):
vm_name = '-'.join(vm_name.split('-')[:-1]) + "-def"
vmchain = vm_name