OpenSDN source code
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
route_leak.cc
Go to the documentation of this file.
1 #include <cmn/agent_cmn.h>
2 #include <route/route.h>
3 #include <oper/nexthop.h>
4 #include <oper/tunnel_nh.h>
5 #include <oper/route_common.h>
6 #include <oper/vrf.h>
7 #include <oper/vrouter.h>
8 #include <oper/route_leak.h>
9 
11  InetUnicastAgentRouteTable *table = dest_vrf_->GetInet4UnicastRouteTable();
12  const InetUnicastRouteEntry *uc_rt =
13  static_cast<const InetUnicastRouteEntry *>(route);
14  const AgentPath *active_path = uc_rt->GetActivePath();
15  const TunnelNH *nh = dynamic_cast<const TunnelNH *>(active_path->nexthop());
16 
17  if (nh == NULL) {
18  return;
19  }
20 
21  Ip4Address gw_ip = *(nh->GetDip());
22 
23  if (gw_ip == uc_rt->prefix_address().to_v4() &&
25  uc_rt->prefix_address().to_v4())) {
26  bool resolved = false;
27  MacAddress mac;
28  const Interface *itf = agent_->vhost_interface();
29  ArpNHKey nh_key(dest_vrf_->GetName(), uc_rt->prefix_address().to_v4(), false);
30  ArpNH *arp_nh = static_cast<ArpNH *>(agent_->nexthop_table()->
31  FindActiveEntry(&nh_key));
32  if (arp_nh) {
33  resolved = arp_nh->GetResolveState();
34  mac = arp_nh->GetMac();
35  itf = arp_nh->GetInterface();
36  }
38  (dest_vrf_->GetName(), uc_rt->prefix_address().to_v4(), mac, itf,
39  resolved, active_path->dest_vn_list(),
40  active_path->sg_list(), active_path->tag_list());
41  return;
42  }
43 
44  const Peer *peer = agent_->local_peer();
45  peer_list_.insert(peer);
46 
47  if (gw_ip == uc_rt->prefix_address().to_v4()) {
48  gw_ip = agent_->vhost_default_gateway()[0];
49  }
50 
51  table->AddGatewayRoute(peer, dest_vrf_->GetName(),
52  uc_rt->prefix_address().to_v4(),
53  uc_rt->prefix_length(),
54  AddressList(1, gw_ip),
55  active_path->dest_vn_list(),
57  active_path->sg_list(),
58  active_path->tag_list(),
59  active_path->communities(), true);
60 }
61 
63  const AgentPath *path) {
64  const InetUnicastRouteEntry *uc_rt =
65  static_cast<const InetUnicastRouteEntry *>(route);
66  const AgentPath *active_path = path;
67 
68  if (active_path == NULL) {
69  active_path = uc_rt->GetActivePath();
70  }
71 
72  InterfaceNH *intf_nh = dynamic_cast<InterfaceNH *>(active_path->nexthop());
73  if (intf_nh == NULL) {
74  return;
75  }
76 
77  if (uc_rt->IsHostRoute() &&
78  uc_rt->prefix_address() == agent_->router_id()) {
79  //Dont overwrite vhost IP in default VRF
80  if (intf_nh->GetInterface() != agent_->vhost_interface()) {
81  return;
82  }
83  }
84 
85  if (intf_nh->GetInterface()->type() == Interface::PACKET) {
86  peer_list_.insert(agent_->local_peer());
88  static_cast<InetUnicastAgentRouteTable *>
89  (dest_vrf_->GetInet4UnicastRouteTable());
90 
91  table->AddHostRoute(dest_vrf_->GetName(), uc_rt->prefix_address(), uc_rt->prefix_length(),
92  "", true);
93  return;
94  }
95 
96  if (intf_nh->GetInterface()->type() == Interface::VM_INTERFACE) {
97  const VmInterface *vm_intf =
98  static_cast<const VmInterface *>(intf_nh->GetInterface());
99  if (vm_intf->vmi_type() == VmInterface::VHOST) {
100  if (uc_rt->prefix_address() == agent_->router_id()) {
101  if (uc_rt->FindLocalVmPortPath() == NULL) {
102  peer_list_.insert(agent_->local_peer());
103  } else {
105  }
106  AddReceiveRoute(route);
107  return;
108  }
109  }
110  }
111 
112  const Peer *peer = active_path->peer();
113  if (uc_rt->FindLocalVmPortPath() == NULL) {
114  peer = agent_->local_peer();
115  }
116 
117  /* Don't export /32 routes on fabric-vrf, if they are part of vrouter's
118  * subnet list. To disable export, use local_peer */
119  if ((uc_rt->IsHostRoute()) &&
120  dest_vrf_->GetName() == agent_->fabric_vrf_name()) {
121  if (agent_->oper_db()->vrouter()->IsSubnetMember(uc_rt->prefix_address())) {
122  peer = agent_->local_peer();
123  }
124  }
125 
126  peer_list_.insert(peer);
128  intf_nh->GetInterface()->name());
129  LocalVmRoute *local_vm_route = NULL;
130  local_vm_route =
133  active_path->dest_vn_list(), InterfaceNHFlags::INET4,
135  TagList(),
136  CommunityList(),
137  active_path->path_preference(),
139  false, false, peer->sequence_number(),
140  false, true);
141  local_vm_route->set_native_vrf_id(uc_rt->vrf()->rd());
142 
144  req.key.reset(new InetUnicastRouteKey(peer, dest_vrf_->GetName(),
145  uc_rt->prefix_address(), uc_rt->prefix_length()));
146  req.data.reset(local_vm_route);
147 
148  AgentRouteTable *table =
150  if (table) {
151  table->Process(req);
152  }
153 }
154 
156  for(Route::PathList::const_iterator it = route->GetPathList().begin();
157  it != route->GetPathList().end(); it++) {
158  const AgentPath *path = static_cast<const AgentPath *>(it.operator->());
159  if (path->peer()->GetType() == Peer::LOCAL_VM_PORT_PEER) {
160  AddInterfaceRoute(route, path);
161  }
162  }
163 }
164 
166  const InetUnicastRouteEntry *uc_rt =
167  static_cast<const InetUnicastRouteEntry *>(route);
168  const AgentPath *active_path = uc_rt->GetActivePath();
169 
170  /* This is a defensive check added to prevent the code below from casting NHs
171  * not containing an interface to RECEIVE NH */
172  const NextHop* nh = active_path->nexthop();
173  if ((nh->GetType() != NextHop::INTERFACE) &&
174  (nh->GetType() != NextHop::RECEIVE)) {
175  return;
176  }
177 
178  const ReceiveNH *rch_nh =
179  static_cast<const ReceiveNH*>(active_path->nexthop());
180  const VmInterface *vm_intf =
181  static_cast<const VmInterface *>(rch_nh->GetInterface());
182 
184  static_cast<InetUnicastAgentRouteTable *>(
185  dest_vrf_->GetInet4UnicastRouteTable());
186 
187  VmInterfaceKey vmi_key(AgentKey::ADD_DEL_CHANGE, vm_intf->GetUuid(),
188  vm_intf->name());
190  dest_vrf_->GetName(),
191  vmi_key,
192  uc_rt->prefix_address(),
193  uc_rt->prefix_length(),
194  agent_->fabric_vn_name(), false, true);
195 }
196 
198  //Never replace resolve route and default route
201  std::vector<Ip4Address> gateway_list = agent_->vhost_default_gateway();
202 
203  if (rt->prefix_address() == Ip4Address(0) && rt->prefix_length() == 0) {
204  return false;
205  }
206 
207  InetUnicastRouteEntry *rsl_rt = table->FindResolveRoute(rt->prefix_address().to_v4());
208  if (rsl_rt && rt->prefix_address() == rsl_rt->prefix_address() &&
209  rt->prefix_length() == rsl_rt->prefix_length()) {
210  //Dont overwrite resolve route
211  return false;
212  }
213 
214  if (rt->IsHostRoute() &&
215  std::find(gateway_list.begin(), gateway_list.end(),
216  rt->prefix_address()) != gateway_list.end()) {
217  return false;
218  }
219 
220  //Always add gateway and DNS routes
221  const InterfaceNH *nh =
222  dynamic_cast<const InterfaceNH *>(rt->GetActiveNextHop());
223  if (nh && nh->GetInterface()->type() == Interface::PACKET) {
224  return true;
225  }
226 
227  if ((rt->GetActivePath()->tunnel_bmap() & TunnelType::NativeType()) == 0) {
228  return false;
229  }
230 
231  return true;
232 }
233 
235  const InetUnicastRouteEntry *uc_rt =
236  static_cast<const InetUnicastRouteEntry *>(route);
237  const NextHop *anh = uc_rt->GetActiveNextHop();
238  if (CanAdd(uc_rt) == false && anh) {
239  DeleteRoute(route, peer_list_);
240  return;
241  }
242 
243  std::set<const Peer *> old_peer_list = peer_list_;
244  peer_list_.clear();
245 
246  if (anh->GetType() == NextHop::TUNNEL) {
247  AddIndirectRoute(route);
248  } else if ((anh->GetType() == NextHop::COMPOSITE)||
249  (route->FindLocalVmPortPath() &&
250  route->FindLocalVmPortPath()->nexthop() &&
251  route->FindLocalVmPortPath()->nexthop()->GetType()
252  == NextHop::COMPOSITE)) {
253  AddCompositeRoute(route);
254  } else if (anh->GetType() == NextHop::INTERFACE) {
255  AddInterfaceRoute(route, route->FindLocalVmPortPath());
256  }
257 
258  bool sync = false;
259  if (old_peer_list != peer_list_) {
260  sync = true;
261  }
262 
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;
266  it++;
267  if (peer_list_.find(*prev_it) != peer_list_.end()) {
268  old_peer_list.erase(prev_it);
269  }
270  }
271 
272  DeleteRoute(route, old_peer_list);
273 
274  if (sync) {
276  dest_vrf_->GetInet4UnicastRouteTable();
278  dest_vrf_->GetName(), uc_rt->prefix_address(), uc_rt->prefix_length());
279  }
280 }
281 
283  const std::set<const Peer *> &peer_list) {
284  if (dest_vrf_ == NULL) {
285  return;
286  }
287 
288  std::set<const Peer *>::const_iterator it = peer_list.begin();
289  for(; it != peer_list.end(); it++) {
290  const InetUnicastRouteEntry *uc_rt =
291  static_cast<const InetUnicastRouteEntry *>(route);
292  dest_vrf_->GetInet4UnicastRouteTable()->Delete(*it,
293  dest_vrf_->GetName(),
294  uc_rt->prefix_address(),
295  uc_rt->prefix_length());
296  }
297 }
298 
300  VrfEntry *dest_vrf):
301  source_vrf_(source_vrf), dest_vrf_(dest_vrf), deleted_(false) {
302 
303  AgentRouteTable *table = source_vrf->GetInet4UnicastRouteTable();
305  this, _1, _2));
306 
307  //Walker would be used to address change of dest VRF table
308  //Everytime dest vrf change all the route from old dest VRF
309  //would be deleted and added to new dest VRF if any
310  //If VRF is deleted upon walk done state would be deleted.
311  walk_ref_ = table->AllocWalker(
312  boost::bind(&RouteLeakVrfState::WalkCallBack, this, _1, _2),
313  boost::bind(&RouteLeakVrfState::WalkDoneInternal, this, _2));
314  table->WalkTable(walk_ref_);
315 }
316 
318  source_vrf_->GetInet4UnicastRouteTable()->ReleaseWalker(walk_ref_);
319  source_vrf_->GetInet4UnicastRouteTable()->Unregister(route_listener_id_);
320 }
321 
323  if (deleted_) {
324  delete this;
325  }
326 }
327 
329  Notify(partition, entry);
330  return true;
331 }
332 
334  InetUnicastAgentRouteTable *table = source_vrf_->GetInet4UnicastRouteTable();
335 
336  VnListType vn_list;
337  vn_list.insert(table->agent()->fabric_vn_name());
338 
339  table->AddGatewayRoute(table->agent()->local_peer(),
340  source_vrf_->GetName(), Ip4Address(0), 0,
341  table->agent()->vhost_default_gateway(), vn_list,
343  TagList(), CommunityList(), true);
344 }
345 
347  InetUnicastAgentRouteTable *table = source_vrf_->GetInet4UnicastRouteTable();
348  table->Delete(table->agent()->local_peer(), source_vrf_->GetName(),
349  Ip4Address(0), 0);
350 }
351 
353  deleted_ = true;
354  source_vrf_->GetInet4UnicastRouteTable()->WalkAgain(walk_ref_);
356 }
357 
359  AgentRoute *route = static_cast<AgentRoute *>(entry);
360  RouteLeakState *state =
361  static_cast<RouteLeakState *>(entry->GetState(partition->parent(),
363 
364  if (route->IsDeleted() || deleted_) {
365  if (state) {
366  //Delete the route
367  entry->ClearState(partition->parent(), route_listener_id_);
368  state->DeleteRoute(route, state->peer_list());
369  delete state;
370  }
371  return true;
372  }
373 
374  if (state == NULL && dest_vrf_) {
375  state = new RouteLeakState(dest_vrf_->GetInet4UnicastRouteTable()->agent(),
376  NULL);
377  route->SetState(partition->parent(), route_listener_id_, state);
378  }
379 
380  if (state == NULL) {
381  return true;
382  }
383 
384  if (state->dest_vrf() != dest_vrf_) {
385  state->DeleteRoute(route, state->peer_list());
386  }
387 
388  if (state->dest_vrf() != dest_vrf_) {
389  //Add the route in new VRF
390  state->set_dest_vrf(dest_vrf_.get());
391  }
392 
393  if (state->dest_vrf()) {
394  state->AddRoute(route);
395  }
396  return true;
397 }
398 
400  if (dest_vrf_ != vrf) {
401  dest_vrf_ = vrf;
402  source_vrf_->GetInet4UnicastRouteTable()->WalkAgain(walk_ref_);
403  }
404 
405  if (vrf == NULL) {
407  } else {
408  AddDefaultRoute();
409  }
410 }
411 
414  boost::bind(&RouteLeakManager::Notify, this, _1, _2));
415 }
416 
419 }
420 
422  VrfEntry *vrf = static_cast<VrfEntry *>(entry);
423  RouteLeakVrfState *state =
424  static_cast<RouteLeakVrfState *>(entry->GetState(partition->parent(),
426 
427  if (vrf->IsDeleted()) {
428  if (state) {
429  entry->ClearState(partition->parent(), vrf_listener_id_);
430  state->Delete();
431  }
432  return;
433  }
434 
435 
436  if (state == NULL && vrf->forwarding_vrf()) {
437  state = new RouteLeakVrfState(vrf, NULL);
438  }
439 
440  if (state == NULL) {
441  return;
442  }
443 
444  vrf->SetState(partition->parent(), vrf_listener_id_, state);
445 
446  if (vrf->forwarding_vrf() != state->dest_vrf()) {
447  state->SetDestVrf(vrf->forwarding_vrf());
448  }
449 }
450 
452  if (vrf_walk_ref_.get() == NULL) {
454  boost::bind(&RouteLeakManager::VrfWalkNotify, this, _1, _2),
455  boost::bind(&RouteLeakManager::VrfWalkDone, this, _2));
456  }
458 }
459 
461  DBEntryBase *e) {
462  VrfEntry *vrf = static_cast<VrfEntry *>(e);
463  RouteLeakVrfState *state =
464  static_cast<RouteLeakVrfState *>(e->GetState(partition->parent(),
466  if (vrf->IsDeleted()) {
467  return true;
468  }
469  /* Ignore VRFs on which routes are not leaked by RouteLeakManager */
470  if (state == NULL) {
471  return true;
472  }
473  if (state->deleted()) {
474  return true;
475  }
476 
477  StartRouteWalk(vrf, state);
478  return true;
479 }
480 
482 }
483 
486  if (!table) {
487  return;
488  }
489  DBTable::DBTableWalkRef rt_table_walk_ref = table->AllocWalker(
490  boost::bind(&RouteLeakVrfState::Notify, state, _1, _2),
491  boost::bind(&RouteLeakManager::RouteWalkDone, this, _2));
492  table->WalkAgain(rt_table_walk_ref);
493 }
494 
496 }
uint8_t prefix_length() const
!
AgentPath * FindLocalVmPortPath() const
Definition: agent_route.cc:742
const Interface * GetInterface() const
Definition: nexthop.h:1293
void StartRouteWalk(VrfEntry *vrf, RouteLeakVrfState *state)
Definition: route_leak.cc:484
const VnListType & dest_vn_list() const
Definition: agent_path.h:258
void AddDefaultRoute()
Definition: route_leak.cc:333
Type type() const
Definition: interface.h:112
Agent * agent_
Definition: route_leak.h:33
void AddInterfaceRoute(const AgentRoute *route, const AgentPath *path)
Definition: route_leak.cc:62
bool IsSubnetMember(const IpAddress &addr) const
Definition: vrouter.cc:159
void WalkTable(DBTableWalkRef walk)
Definition: db_table.cc:625
VrfEntryRef dest_vrf_
Definition: route_leak.h:60
Definition: vrf.h:86
const TagList & tag_list() const
Definition: agent_path.h:249
const PathPreference & path_preference() const
Definition: agent_path.h:329
VrfEntry * fabric_vrf() const
Definition: agent.h:915
DBState * GetState(DBTableBase *tbl_base, ListenerId listener) const
Definition: db_entry.cc:37
void Notify(DBTablePartBase *partition, DBEntryBase *e)
Definition: route_leak.cc:421
const boost::uuids::uuid & GetUuid() const
Definition: interface.h:113
NextHopTable * nexthop_table() const
Definition: agent.h:475
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.
Definition: agent_route.h:109
void AddReceiveRoute(const AgentRoute *route)
Definition: route_leak.cc:165
const Interface * vhost_interface() const
Definition: agent.h:935
void WalkDoneInternal(DBTableBase *part)
Definition: route_leak.cc:322
bool IsDeleted() const
Definition: db_entry.h:49
void SetState(DBTableBase *tbl_base, ListenerId listener, DBState *state)
Definition: db_entry.cc:22
std::vector< int > SecurityGroupList
Definition: agent.h:201
static const uint32_t kInvalidExportLabel
Definition: mpls.h:102
bool WalkCallBack(DBTablePartBase *partition, DBEntryBase *entry)
Definition: route_leak.cc:328
bool CanAdd(const InetUnicastRouteEntry *route)
Definition: route_leak.cc:197
std::unique_ptr< DBRequestData > data
Definition: db_table.h:49
DBTableWalkRef AllocWalker(WalkFn walk_fn, WalkCompleteFn walk_complete)
Definition: db_table.cc:613
std::set< const Peer * > & peer_list()
Definition: route_leak.h:23
InetUnicastAgentRouteTable * GetInet4UnicastRouteTable() const
Definition: vrf.cc:319
DBTableBase * parent()
void VrfWalkDone(DBTableBase *part)
Definition: route_leak.cc:481
void RouteWalkDone(DBTableBase *part)
Definition: route_leak.cc:495
const Ip4Address * GetDip() const
Definition: tunnel_nh.h:37
void SetDestVrf(VrfEntry *dest_vrf)
Definition: route_leak.cc:399
DBTableBase::ListenerId route_listener_id_
Definition: route_leak.h:61
bool deleted() const
Definition: route_leak.h:50
AddressList vhost_default_gateway() const
Definition: agent.h:656
RouteLeakVrfState(VrfEntry *source_vrf, VrfEntry *dest_vrf)
Definition: route_leak.cc:299
DBTable::DBTableWalkRef walk_ref_
Definition: route_leak.h:62
void DeleteDefaultRoute()
Definition: route_leak.cc:346
void set_native_vrf_id(uint32_t vrf_id)
Definition: agent_path.h:689
Type GetType() const
Definition: nexthop.h:405
Base class for all Route entries in agent.
Definition: agent_route.h:224
void Unregister(ListenerId listener)
Definition: db_table.cc:186
OperDB * oper_db() const
Definition: agent.cc:1013
InetUnicastAgentRouteTable * GetInet4UnicastRouteTable(const std::string &vrf_name)
Definition: vrf.cc:898
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")
Definition: db_table.cc:181
const std::string & fabric_vrf_name() const
Definition: agent.h:903
const Type GetType() const
Definition: peer.h:87
const AgentPath * GetActivePath() const
Definition: agent_route.cc:876
NextHop * nexthop() const
Definition: agent_path.cc:87
void WalkAgain(DBTableWalkRef walk)
Definition: db_table.cc:631
RouteLeakManager(Agent *agent)
Definition: route_leak.cc:412
static void Delete(const Peer *peer, const string &vrf_name, const IpAddress &addr, uint8_t plen)
VrfEntry * dest_vrf()
Definition: route_leak.h:47
VRouter * vrouter() const
Definition: operdb_init.h:76
static const uint32_t kInvalidvxlan_id
Definition: vxlan.h:141
void AddCompositeRoute(const AgentRoute *route)
Definition: route_leak.cc:155
bool Notify(DBTablePartBase *partition, DBEntryBase *e)
Definition: route_leak.cc:358
Definition: agent.h:358
const NextHop * GetActiveNextHop() const
Definition: agent_route.cc:881
Ip4Address router_id() const
Definition: agent.h:666
std::unique_ptr< DBRequestKey > key
Definition: db_table.h:48
Definition: nexthop.h:820
const Peer * peer() const
Definition: agent_path.h:263
void ReEvaluateRouteExports()
Definition: route_leak.cc:451
uint64_t sequence_number() const
Definition: peer.h:94
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)
Definition: route_leak.cc:282
Agent * agent_
Definition: route_leak.h:87
const Interface * GetInterface() const
Definition: nexthop.h:686
const Peer * local_peer() const
Definition: agent.h:1022
VrfEntry * dest_vrf() const
Definition: route_leak.h:19
std::vector< std::string > CommunityList
Definition: bgp_config.h:347
std::vector< Ip4Address > AddressList
Definition: agent.h:217
Definition: peer.h:44
void ResyncRoute(const Peer *peer, const string &vrf, const IpAddress &addr, uint8_t plen)
std::set< std::string > VnListType
Definition: agent.h:212
void ClearState(DBTableBase *tbl_base, ListenerId listener)
Definition: db_entry.cc:73
static TypeBmap NativeType()
Definition: nexthop.h:325
virtual const PrefixType & prefix_address() const
Returns the value of a stored prefix address (IPv4, IPv6 or MAC address)
Definition: agent_route.h:375
boost::asio::ip::address_v4 Ip4Address
Definition: address.h:14
static const uint32_t kInvalidLabel
Definition: mpls.h:101
VrfTable * vrf_table() const
Definition: agent.h:485
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
Definition: nexthop.cc:730
VrfEntry * forwarding_vrf() const
Definition: vrf.h:217
VrfEntry * vrf() const
Definition: agent_route.h:275
Agent * agent() const
Definition: agent_route.h:159
void Process(DBRequest &req)
Definition: agent_route.cc:186
const std::string & name() const
Definition: interface.h:114
void AddIndirectRoute(const AgentRoute *route)
Definition: route_leak.cc:10
int rd() const
Definition: vrf.h:220
const Peer * fabric_rt_export_peer() const
Definition: agent.h:1037
boost::intrusive_ptr< DBTableWalk > DBTableWalkRef
Definition: db_table.h:169
uint32_t tunnel_bmap() const
Definition: agent_path.h:267
const std::string & fabric_vn_name() const
Definition: agent.h:901
std::set< const Peer * > peer_list_
Definition: route_leak.h:35
VrfEntryRef dest_vrf_
Definition: route_leak.h:34
VrfEntryRef source_vrf_
Definition: route_leak.h:58
const CommunityList & communities() const
Definition: agent_path.h:250
bool VrfWalkNotify(DBTablePartBase *partition, DBEntryBase *e)
Definition: route_leak.cc:460
DBTable::DBTableWalkRef vrf_walk_ref_
Definition: route_leak.h:88
DBTableBase::ListenerId vrf_listener_id_
Definition: route_leak.h:89
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
Definition: nexthop.h:842
const SecurityGroupList & sg_list() const
Definition: agent_path.h:248
void AddRoute(const AgentRoute *route)
Definition: route_leak.cc:234
void set_dest_vrf(VrfEntry *vrf)
Definition: route_leak.h:15
const PathList & GetPathList() const
Definition: route.h:46
std::vector< int > TagList
Definition: agent.h:202