From 6151a7b184c2aade98f0a3894f6eb411da6e06e1 Mon Sep 17 00:00:00 2001 From: Nischal Sheth Date: Mon, 7 Mar 2016 09:40:55 -0800 Subject: [PATCH] Include med in route introspect Change-Id: If7271accdce896a22bb5ecf68c09421eaa2fc2b8 Partial-Bug: 1548570 --- src/bgp/bgp_peer.sandesh | 2 ++ src/bgp/bgp_route.cc | 2 ++ 2 files changed, 4 insertions(+) diff --git a/src/bgp/bgp_peer.sandesh b/src/bgp/bgp_peer.sandesh index e656add3c63..33dcc103bb0 100644 --- a/src/bgp/bgp_peer.sandesh +++ b/src/bgp/bgp_peer.sandesh @@ -125,6 +125,7 @@ request sandesh ShowBgpNeighborSummaryReq { struct ShowRoutePathBrief { 1: string protocol; 2: u32 local_preference; + 6: u32 med; 3: string source; 4: string next_hop; 5: u32 label; @@ -152,6 +153,7 @@ struct ShowRoutePath { 1: string protocol; 3: string last_modified; 5: u32 local_preference; + 25: u32 med; 6: u32 local_as; 7: u32 peer_as; 8: string peer_router_id; // neighbor neighbor route id diff --git a/src/bgp/bgp_route.cc b/src/bgp/bgp_route.cc index ebd91073b5b..72b32081a86 100644 --- a/src/bgp/bgp_route.cc +++ b/src/bgp/bgp_route.cc @@ -300,6 +300,7 @@ void BgpRoute::FillRouteInfo(const BgpTable *table, const BgpAttr *attr = path->GetAttr(); srp.set_local_preference(attr->local_pref()); + srp.set_med(attr->med()); srp.set_next_hop(attr->nexthop().to_string()); srp.set_label(path->GetLabel()); show_route_paths.push_back(srp); @@ -431,6 +432,7 @@ void BgpRoute::FillRouteInfo(const BgpTable *table, if (attr->as_path() != NULL) srp.set_as_path(attr->as_path()->path().ToString()); srp.set_local_preference(attr->local_pref()); + srp.set_med(attr->med()); srp.set_next_hop(attr->nexthop().to_string()); srp.set_label(path->GetLabel()); srp.set_flags(path->GetFlagsStringList());