Skip to content

Commit

Permalink
Ensure vrouter_evicted_flow flag is not overwritten.
Browse files Browse the repository at this point in the history
Assert only if the flow is not evicted.

Change-Id: I8a805a04750f78e87d717567e931fc0510e52cb9
closes-bug: 1520494
  • Loading branch information
haripk committed Nov 27, 2015
1 parent 8a545d5 commit 99647cd
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/vnsw/agent/pkt/flow_table.cc
Expand Up @@ -507,7 +507,7 @@ void FlowTable::DeleteByIndex(uint32_t flow_handle, FlowEntry *fe) {
if (flow_handle != FlowEntry::kInvalidFlowHandle) {
if (flow_index_tree_[flow_handle].get() == fe) {
flow_index_tree_[flow_handle] = NULL;
} else {
} else if (fe->data().vrouter_evicted_flow == false) {
assert(0);
}
}
Expand Down Expand Up @@ -882,9 +882,10 @@ void FlowTable::UpdateKSync(FlowEntry *flow, bool update) {
//Actual msg would not be sent to kernel
if (update == false) {
if (flow->ksync_entry() != NULL) {
bool vrouter_evicted_flow = flow->data().vrouter_evicted_flow;
flow->data().vrouter_evicted_flow = true;
ksync_object_->Delete(flow->ksync_entry());
flow->data().vrouter_evicted_flow = false;
flow->data().vrouter_evicted_flow = vrouter_evicted_flow;
flow->set_ksync_entry(NULL);
}
}
Expand Down

0 comments on commit 99647cd

Please sign in to comment.