]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commitdiff
Fix logic issue in OVSQuantumAgent.port_unbound method
authorEugene Nikanorov <enikanorov@mirantis.com>
Sat, 27 Apr 2013 16:43:13 +0000 (20:43 +0400)
committerEugene Nikanorov <enikanorov@mirantis.com>
Sat, 27 Apr 2013 16:43:13 +0000 (20:43 +0400)
Fixes bug 1173463

Change-Id: If2978fc4c38304667f6910085cb220491d236a11

quantum/plugins/openvswitch/agent/ovs_quantum_agent.py

index e369934555364c314f188d3e50b89bb83ad9c80c..91dcda1f64cae1c50a2e1c1d7650e3107ec41941 100644 (file)
@@ -472,13 +472,11 @@ class OVSQuantumAgent(sg_rpc.SecurityGroupAgentRpcCallbackMixin):
                      net_uuid)
             return
         lvm = self.local_vlan_map[net_uuid]
-        if lvm.network_type == 'gre':
-            if self.enable_tunneling:
+        if vif_id in lvm.vif_ports:
+            if lvm.network_type == 'gre' and self.enable_tunneling:
                 # remove inbound unicast flow
                 self.tun_br.delete_flows(tun_id=lvm.segmentation_id,
                                          dl_dst=lvm.vif_ports[vif_id].vif_mac)
-
-        if vif_id in lvm.vif_ports:
             del lvm.vif_ports[vif_id]
         else:
             LOG.info(_('port_unbound: vif_id %s not in local_vlan_map'),