Skip to content

Commit

Permalink
Handle SG-ID update in route for dest-ip
Browse files Browse the repository at this point in the history
Fix a bug in method RouteFlowKey::FlowDestMatch where source_plen is
used in place of dest_plen

Change-Id: I97918e91c95767b7b428e0bbd0b6440440a461ce
Closes-Bug: #1471933
  • Loading branch information
praveenkv committed Jul 7, 2015
1 parent 0e2f30f commit 85362a8
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/vnsw/agent/pkt/flow_table.cc
Expand Up @@ -1987,7 +1987,7 @@ bool RouteFlowKey::FlowDestMatch(const FlowEntry *flow) const {
return (flow->data().dmac == mac);
}

if (flow->data().source_plen != plen ||
if (flow->data().dest_plen != plen ||
flow->key().family != family)
return false;

Expand Down
9 changes: 9 additions & 0 deletions src/vnsw/agent/pkt/test/test_sg_flow.cc
Expand Up @@ -472,6 +472,15 @@ bool sg_introspec_test = false;
static void SgListResponse(Sandesh *sandesh, int id, int sg_id, int num_entries)
{
SgListResp *resp = dynamic_cast<SgListResp *>(sandesh);
if (resp == NULL) {
Pagination *page = dynamic_cast<Pagination *>(sandesh);
if (page != NULL) {
return;
}
sg_introspec_test = false;
return;
}

EXPECT_EQ(resp->get_sg_list().size(), num_entries);
if (!sg_id) {
EXPECT_EQ(resp->get_sg_list()[0].sg_uuid, UuidToString(MakeUuid(id)));
Expand Down

0 comments on commit 85362a8

Please sign in to comment.