Skip to content

Commit

Permalink
Set action to drop if its a short flow.
Browse files Browse the repository at this point in the history
To handle the cases where TrafficAction gets overridden after being marked as
drop, use short flow flag as well to identify drop action.

Change-Id: I45e98836c5463a9913f2a9bdb9aeedc2643f6c2c
Closes-bug: #1664301
  • Loading branch information
manishsing committed Feb 24, 2017
1 parent 6bdb476 commit 517775d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
5 changes: 0 additions & 5 deletions src/vnsw/agent/pkt/flow_entry.cc
Expand Up @@ -2079,11 +2079,6 @@ bool FlowEntry::ActionRecompute() {
}
}

// Force short flows to DROP
if (is_flags_set(FlowEntry::ShortFlow)) {
action |= (1 << TrafficAction::DENY);
}

if (SetQosConfigIndex()) {
ret = true;
}
Expand Down
4 changes: 4 additions & 0 deletions src/vnsw/agent/vrouter/ksync/flowtable_ksync.cc
Expand Up @@ -399,6 +399,10 @@ int FlowTableKSyncEntry::Encode(sandesh_op::type op, char *buf, int buf_len) {
}
}

if (flow_entry_->IsShortFlow()) {
action = VR_FLOW_ACTION_DROP;
}

req.set_fr_flags(flags);
req.set_fr_action(action);
req.set_fr_drop_reason(drop_reason);
Expand Down

0 comments on commit 517775d

Please sign in to comment.