26 bool resolved =
false;
31 FindActiveEntry(&nh_key));
34 mac = arp_nh->GetMac();
35 itf = arp_nh->GetInterface();
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();
289 for(; it != peer_list.end(); it++) {
292 dest_vrf_->GetInet4UnicastRouteTable()->Delete(*it,
301 source_vrf_(source_vrf), dest_vrf_(dest_vrf), deleted_(false) {
uint8_t prefix_length() const
!
AgentPath * FindLocalVmPortPath() const
const Interface * GetInterface() const
void StartRouteWalk(VrfEntry *vrf, RouteLeakVrfState *state)
const VnListType & dest_vn_list() const
void AddInterfaceRoute(const AgentRoute *route, const AgentPath *path)
bool IsSubnetMember(const IpAddress &addr) const
void WalkTable(DBTableWalkRef walk)
const TagList & tag_list() const
const PathPreference & path_preference() const
VrfEntry * fabric_vrf() const
DBState * GetState(DBTableBase *tbl_base, ListenerId listener) const
void Notify(DBTablePartBase *partition, DBEntryBase *e)
const boost::uuids::uuid & GetUuid() const
NextHopTable * nexthop_table() const
Agent supports multiple route tables - Inet-unicast (IPv4/IPv6), Inet-multicast, bridge, EVPN (Type2/Type5). This base class contains common code for all types of route tables.
void AddReceiveRoute(const AgentRoute *route)
const Interface * vhost_interface() const
void WalkDoneInternal(DBTableBase *part)
void SetState(DBTableBase *tbl_base, ListenerId listener, DBState *state)
std::vector< int > SecurityGroupList
static const uint32_t kInvalidExportLabel
bool WalkCallBack(DBTablePartBase *partition, DBEntryBase *entry)
bool CanAdd(const InetUnicastRouteEntry *route)
std::unique_ptr< DBRequestData > data
DBTableWalkRef AllocWalker(WalkFn walk_fn, WalkCompleteFn walk_complete)
std::set< const Peer * > & peer_list()
InetUnicastAgentRouteTable * GetInet4UnicastRouteTable() const
void VrfWalkDone(DBTableBase *part)
void RouteWalkDone(DBTableBase *part)
const Ip4Address * GetDip() const
void SetDestVrf(VrfEntry *dest_vrf)
DBTableBase::ListenerId route_listener_id_
AddressList vhost_default_gateway() const
RouteLeakVrfState(VrfEntry *source_vrf, VrfEntry *dest_vrf)
DBTable::DBTableWalkRef walk_ref_
void DeleteDefaultRoute()
void set_native_vrf_id(uint32_t vrf_id)
Base class for all Route entries in agent.
void Unregister(ListenerId listener)
InetUnicastAgentRouteTable * GetInet4UnicastRouteTable(const std::string &vrf_name)
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)
ListenerId Register(ChangeCallback callback, const std::string &name="unspecified")
const std::string & fabric_vrf_name() const
const Type GetType() const
const AgentPath * GetActivePath() const
NextHop * nexthop() const
void WalkAgain(DBTableWalkRef walk)
RouteLeakManager(Agent *agent)
static void Delete(const Peer *peer, const string &vrf_name, const IpAddress &addr, uint8_t plen)
VRouter * vrouter() const
static const uint32_t kInvalidvxlan_id
void AddCompositeRoute(const AgentRoute *route)
bool Notify(DBTablePartBase *partition, DBEntryBase *e)
const NextHop * GetActiveNextHop() const
Ip4Address router_id() const
std::unique_ptr< DBRequestKey > key
const Peer * peer() const
void ReEvaluateRouteExports()
uint64_t sequence_number() const
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)
void DeleteRoute(const AgentRoute *route, const std::set< const Peer * > &peer_list)
const Interface * GetInterface() const
const Peer * local_peer() const
VrfEntry * dest_vrf() const
std::vector< std::string > CommunityList
std::vector< Ip4Address > AddressList
void ResyncRoute(const Peer *peer, const string &vrf, const IpAddress &addr, uint8_t plen)
std::set< std::string > VnListType
void ClearState(DBTableBase *tbl_base, ListenerId listener)
static TypeBmap NativeType()
virtual const PrefixType & prefix_address() const
Returns the value of a stored prefix address (IPv4, IPv6 or MAC address)
boost::asio::ip::address_v4 Ip4Address
static const uint32_t kInvalidLabel
VrfTable * vrf_table() const
VmInterface::VmiType vmi_type() const
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)
const boost::uuids::uuid & GetIfUuid() const
VrfEntry * forwarding_vrf() const
void Process(DBRequest &req)
const std::string & name() const
void AddIndirectRoute(const AgentRoute *route)
const Peer * fabric_rt_export_peer() const
boost::intrusive_ptr< DBTableWalk > DBTableWalkRef
uint32_t tunnel_bmap() const
const std::string & fabric_vn_name() const
std::set< const Peer * > peer_list_
const CommunityList & communities() const
bool VrfWalkNotify(DBTablePartBase *partition, DBEntryBase *e)
DBTable::DBTableWalkRef vrf_walk_ref_
DBTableBase::ListenerId vrf_listener_id_
static void AddHostRoute(const string &vrf_name, const IpAddress &addr, uint8_t plen, const std::string &dest_vn_name, bool policy)
InetUnicastRouteEntry * FindResolveRoute(const Ip4Address &ip)
bool GetResolveState() const
const SecurityGroupList & sg_list() const
void AddRoute(const AgentRoute *route)
void set_dest_vrf(VrfEntry *vrf)
const PathList & GetPathList() const
std::vector< int > TagList