From e6033719926f79ac0b50f7336366b54573ebe6d2 Mon Sep 17 00:00:00 2001 From: Prakash Bailkeri Date: Mon, 8 Feb 2016 21:07:51 +0530 Subject: [PATCH] OriginVn in show route Skip deriving origin vn if already calculated from extCommunity Change-Id: I617d35d1cf7e027ce62c914597e7c858a6a77efb Related-bug: #1500698 --- src/bgp/bgp_route.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bgp/bgp_route.cc b/src/bgp/bgp_route.cc index 8a18c9e47da..1280dcc831f 100644 --- a/src/bgp/bgp_route.cc +++ b/src/bgp/bgp_route.cc @@ -485,7 +485,7 @@ void BgpRoute::FillRouteInfo(const BgpTable *table, if (attr->ext_community()) { FillRoutePathExtCommunityInfo(table, attr->ext_community(), &srp); } - if (!table->IsVpnTable() && path->IsVrfOriginated()) { + if (srp.get_origin_vn().empty() && !table->IsVpnTable() && path->IsVrfOriginated()) { srp.set_origin_vn(ri->GetVirtualNetworkName()); } if (attr->origin_vn_path()) {