Skip to content

Commit

Permalink
Vrf pending because of mpls label.
Browse files Browse the repository at this point in the history
Problem:
MPLS label was pending pointing to Composite NH. This NH holds
reference to VRF. This label was programmed because adding EVPN path in multicast
route vxlan tag was added as ethernet identifier and label as well. When all
routes except evpn peer path is gone this vxlan tag (which was copied in label)
gets copied to master path which in turn tries to rebake NH for
this label.
EVPN mpls label should only be picked from local path or local vm peer path.

Solution:
Pass invalid label for evpn path.

Change-Id: Iea899d752be101d7a48ebe0e41635ffe23e06602
Closes-bug: #1577517
  • Loading branch information
manishsing authored and haripk committed May 18, 2016
1 parent 5b5934e commit 93e18f9
Show file tree
Hide file tree
Showing 2 changed files with 65 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/vnsw/agent/oper/multicast.cc
Expand Up @@ -663,7 +663,7 @@ void MulticastHandler::ModifyEvpnMembers(const Peer *peer,

TriggerRemoteRouteChange(obj, peer, vrf_name, olist,
peer_identifier, delete_op, Composite::EVPN,
ethernet_tag, false, ethernet_tag);
MplsTable::kInvalidLabel, false, ethernet_tag);
MCTRACE(Log, "Add EVPN TOR Olist ", vrf_name, grp.to_string(), 0);
}

Expand Down
64 changes: 64 additions & 0 deletions src/vnsw/agent/test/test_l2route.cc
Expand Up @@ -1653,6 +1653,70 @@ TEST_F(RouteTest, SquashPathTest_1) {
client->WaitForIdle();
}

//Bug# 1580733
TEST_F(RouteTest, label_in_evpn_mcast_path) {
struct PortInfo input[] = {
{"vnet1", 1, "1.1.1.10", "00:00:00:01:01:01", 1, 1},
};

client->Reset();
//Add VM
CreateVmportEnv(input, 1);
client->WaitForIdle();

BridgeRouteEntry *rt = L2RouteGet("vrf1",
MacAddress::FromString("00:00:00:01:01:01"),
Ip4Address(0));
EXPECT_TRUE(rt != NULL);
uint32_t mpls_label = rt->GetActivePath()->label();
//Add a peer and enqueue path add in multicast route.
BgpPeer *bgp_peer_ptr = CreateBgpPeer(Ip4Address(1), "BGP Peer1");
boost::shared_ptr<BgpPeer> bgp_peer =
bgp_peer_ptr->GetBgpXmppPeer()->bgp_peer_id_ref();
MulticastHandler *mc_handler = static_cast<MulticastHandler *>(agent_->
oper_db()->multicast());
TunnelOlist olist;
olist.push_back(OlistTunnelEntry(nil_uuid(), 10,
IpAddress::from_string("8.8.8.8").to_v4(),
TunnelType::VxlanType()));
//Add EVPN olist
mc_handler->ModifyEvpnMembers(bgp_peer.get(),
"vrf1",
olist,
mpls_label,
1);
client->WaitForIdle();
agent_->oper_db()->multicast()->DeleteBroadcast(agent_->local_vm_peer(), "vrf1",
0, Composite::L2INTERFACE);
BridgeAgentRouteTable::DeleteBroadcastReq(agent_->local_peer(),
"vrf1",
0,
Composite::L2COMP);
client->WaitForIdle();
rt = L2RouteGet("vrf1",
MacAddress::FromString("ff:ff:ff:ff:ff:ff"),
Ip4Address(0));
EXPECT_TRUE(rt != NULL);

//Delete VM
DeleteVmportEnv(input, 1, false);
client->WaitForIdle();

//Delete EVPN
TunnelOlist del_olist;
mc_handler->ModifyEvpnMembers(bgp_peer.get(),
"vrf1",
del_olist,
mpls_label,
ControllerPeerPath::kInvalidPeerIdentifier);
client->WaitForIdle();
DeleteVmportEnv(input, 1, true);
client->WaitForIdle();
DeleteBgpPeer(bgp_peer.get());
client->WaitForIdle();
bgp_peer.reset();
}

int main(int argc, char *argv[]) {
::testing::InitGoogleTest(&argc, argv);
GETUSERARGS();
Expand Down

0 comments on commit 93e18f9

Please sign in to comment.