Skip to content

Commit

Permalink
Along with label modify ethernet-tag as well.
Browse files Browse the repository at this point in the history
Change-Id: I9d56785dcff92b5bbdbaf8b3b33e895be646c607
Closes-bug: 1529665
  • Loading branch information
manishsing committed Feb 4, 2016
1 parent 60ea648 commit 8145128
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/vnsw/agent/controller/controller_peer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2065,14 +2065,14 @@ bool AgentXmppChannel::BuildEvpnMulticastMessage(EnetItemType &item,
nh.tunnel_encapsulation_list.tunnel_encapsulation.push_back("udp");
}
} else {
if (path == NULL)
path = route->FindPath(agent_->local_peer());

if (path) {
nh.label = path->vxlan_id();
item.entry.nlri.ethernet_tag = nh.label;
} else {
//Before marking label as 0 check for local_peer path as well.
path = route->FindPath(agent_->local_peer());
if (path == NULL)
nh.label = 0;
nh.label = 0;
}
nh.tunnel_encapsulation_list.tunnel_encapsulation.push_back("vxlan");
}
Expand Down
2 changes: 2 additions & 0 deletions src/vnsw/agent/test/test_l2route.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1456,6 +1456,8 @@ TEST_F(RouteTest, evpn_mcast_label_check_with_no_vm) {
false);
autogen::EnetNextHopType nh = item.entry.next_hops.next_hop.back();
EXPECT_TRUE(nh.label != 0);
EXPECT_TRUE(item.entry.nlri.ethernet_tag != 0);
EXPECT_TRUE(item.entry.nlri.ethernet_tag == nh.label);
//Add VM
CreateVmportEnv(input, 1);
client->WaitForIdle();
Expand Down

0 comments on commit 8145128

Please sign in to comment.