26 bool resolved =
false;
31 FindActiveEntry(&nh_key));
68 if (active_path == NULL) {
73 if (intf_nh == NULL) {
112 const Peer *peer = active_path->
peer();
146 req.
data.reset(local_vm_route);
156 for(Route::PathList::const_iterator it = route->
GetPathList().begin();
215 std::find(gateway_list.begin(), gateway_list.end(),
238 if (
CanAdd(uc_rt) ==
false && anh) {
243 std::set<const Peer *> old_peer_list =
peer_list_;
263 std::set<const Peer *>::iterator it = old_peer_list.begin();
264 while(it != old_peer_list.end()) {
265 std::set<const Peer *>::iterator prev_it = it;
268 old_peer_list.erase(prev_it);
283 const std::set<const Peer *> &peer_list) {
288 std::set<const Peer *>::const_iterator it =
peer_list.begin();
292 dest_vrf_->GetInet4UnicastRouteTable()->Delete(*it,
301 source_vrf_(source_vrf), dest_vrf_(dest_vrf), deleted_(false) {
boost::asio::ip::address_v4 Ip4Address
std::vector< int > TagList
std::vector< int > SecurityGroupList
std::vector< Ip4Address > AddressList
std::set< std::string > VnListType
std::vector< std::string > CommunityList
const VnListType & dest_vn_list() const
NextHop * nexthop() const
const PathPreference & path_preference() const
const SecurityGroupList & sg_list() const
uint32_t tunnel_bmap() const
const Peer * peer() const
const TagList & tag_list() const
const CommunityList & communities() const
virtual const PrefixType & prefix_address() const
Returns the value of a stored prefix address (IPv4, IPv6 or MAC address)
Agent supports multiple route tables - Inet-unicast (IPv4/IPv6), Inet-multicast, bridge,...
void Process(DBRequest &req)
Base class for all Route entries in agent.
const AgentPath * GetActivePath() const
const NextHop * GetActiveNextHop() const
AgentPath * FindLocalVmPortPath() const
AddressList vhost_default_gateway() const
VrfTable * vrf_table() const
const Peer * local_peer() const
const Peer * fabric_rt_export_peer() const
const std::string & fabric_vn_name() const
VrfEntry * fabric_vrf() const
NextHopTable * nexthop_table() const
const Interface * vhost_interface() const
const std::string & fabric_vrf_name() const
Ip4Address router_id() const
const Interface * GetInterface() const
bool GetResolveState() const
const MacAddress & GetMac() const
DBState * GetState(DBTableBase *tbl_base, ListenerId listener) const
void ClearState(DBTableBase *tbl_base, ListenerId listener)
void SetState(DBTableBase *tbl_base, ListenerId listener, DBState *state)
ListenerId Register(ChangeCallback callback, const std::string &name="unspecified")
void Unregister(ListenerId listener)
void WalkAgain(DBTableWalkRef walk)
DBTableWalkRef AllocWalker(WalkFn walk_fn, WalkCompleteFn walk_complete)
void WalkTable(DBTableWalkRef walk)
boost::intrusive_ptr< DBTableWalk > DBTableWalkRef
InetUnicastRouteEntry * FindResolveRoute(const Ip4Address &ip)
static void AddVHostRecvRoute(const Peer *peer, const string &vrf, const InterfaceKey &interface, const IpAddress &addr, uint8_t plen, const string &vn_name, bool policy, bool native_encap, bool ipam_host_route=true)
static void Delete(const Peer *peer, const string &vrf_name, const IpAddress &addr, uint8_t plen)
void ResyncRoute(const Peer *peer, const string &vrf, const IpAddress &addr, uint8_t plen)
static void CheckAndAddArpRoute(const string &route_vrf_name, const Ip4Address &ip, const MacAddress &mac, const Interface *intf, bool resolved, const VnListType &vn_list, const SecurityGroupList &sg, const TagList &tag)
static void AddGatewayRoute(const Peer *peer, const string &vrf_name, const Ip4Address &dst_addr, uint8_t plen, const AddressList &gw_list, const VnListType &vn_name, uint32_t label, const SecurityGroupList &sg_list, const TagList &tag_list, const CommunityList &communities, bool native_encap)
static void AddHostRoute(const string &vrf_name, const IpAddress &addr, uint8_t plen, const std::string &dest_vn_name, bool policy)
uint8_t prefix_length() const
!
const boost::uuids::uuid & GetIfUuid() const
const Interface * GetInterface() const
const std::string & name() const
const boost::uuids::uuid & GetUuid() const
void set_native_vrf_id(uint32_t vrf_id)
static const uint32_t kInvalidLabel
static const uint32_t kInvalidExportLabel
VRouter * vrouter() const
const Type GetType() const
uint64_t sequence_number() const
const Interface * GetInterface() const
DBTableBase::ListenerId vrf_listener_id_
bool VrfWalkNotify(DBTablePartBase *partition, DBEntryBase *e)
void StartRouteWalk(VrfEntry *vrf, RouteLeakVrfState *state)
DBTable::DBTableWalkRef vrf_walk_ref_
void ReEvaluateRouteExports()
RouteLeakManager(Agent *agent)
void VrfWalkDone(DBTableBase *part)
void RouteWalkDone(DBTableBase *part)
void Notify(DBTablePartBase *partition, DBEntryBase *e)
bool Notify(DBTablePartBase *partition, DBEntryBase *e)
DBTableBase::ListenerId route_listener_id_
void DeleteDefaultRoute()
DBTable::DBTableWalkRef walk_ref_
bool WalkCallBack(DBTablePartBase *partition, DBEntryBase *entry)
void WalkDoneInternal(DBTableBase *part)
RouteLeakVrfState(VrfEntry *source_vrf, VrfEntry *dest_vrf)
void SetDestVrf(VrfEntry *dest_vrf)
const PathList & GetPathList() const
const Ip4Address * GetDip() const
static TypeBmap NativeType()
bool IsSubnetMember(const IpAddress &addr) const
VmInterface::VmiType vmi_type() const
InetUnicastAgentRouteTable * GetInet4UnicastRouteTable() const
VrfEntry * forwarding_vrf() const
InetUnicastAgentRouteTable * GetInet4UnicastRouteTable(const std::string &vrf_name)
static const uint32_t kInvalidvxlan_id
std::unique_ptr< DBRequestKey > key
std::unique_ptr< DBRequestData > data
void AddRoute(const AgentRoute *route)
std::set< const Peer * > peer_list_
void AddReceiveRoute(const AgentRoute *route)
VrfEntry * dest_vrf() const
void DeleteRoute(const AgentRoute *route, const std::set< const Peer * > &peer_list)
bool CanAdd(const InetUnicastRouteEntry *route)
void AddIndirectRoute(const AgentRoute *route)
std::set< const Peer * > & peer_list()
void AddInterfaceRoute(const AgentRoute *route, const AgentPath *path)
void AddCompositeRoute(const AgentRoute *route)
void set_dest_vrf(VrfEntry *vrf)