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());