When removing vport also remove the vxlan tunnel port.
Signed-off-by: Sorin Vinturis <svinturis@cloudbasesolutions.com>
Reported-by: Sorin Vinturis <svinturis@cloudbasesolutions.com>
Reported-at: https://github.com/openvswitch/ovs-issues/issues/94
Acked-by: Alin Gabriel Serdean <aserdean@cloudbasesolutions.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
RemoveEntryList(&vport->ovsNameLink);
RemoveEntryList(&vport->portNoLink);
RemoveEntryList(&vport->tunnelVportLink);
+
+ if (vport->priv) {
+ OvsFreeMemoryWithTag(vport->priv, OVS_VXLAN_POOL_TAG);
+ vport->priv = NULL;
+ }
+
OvsFreeMemoryWithTag(vport, OVS_VPORT_POOL_TAG);
NdisReleaseRWLock(switchContext->dispatchLock, &lockState);
vxlanPort->filterID,
callback,
tunnelContext);
+ } else {
+ OvsFreeMemoryWithTag(vport->priv, OVS_VXLAN_POOL_TAG);
+ vport->priv = NULL;
}
- OvsFreeMemoryWithTag(vport->priv, OVS_VXLAN_POOL_TAG);
- vport->priv = NULL;
-
return status;
}