Skip to content

Commit

Permalink
Merge "Copy flood and wait_for_traffic flag from replacement route" i…
Browse files Browse the repository at this point in the history
…nto R2.0
  • Loading branch information
Zuul authored and opencontrail-ci-admin committed Jun 3, 2015
2 parents ef9e34a + 5b75e0b commit 9195b58
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 4 deletions.
13 changes: 10 additions & 3 deletions src/vnsw/agent/ksync/route_ksync.cc
Expand Up @@ -367,7 +367,8 @@ int RouteKSyncEntry::DeleteMsg(char *buf, int buf_len) {

// IF multicast or EVPN delete unconditionally
if (rt_type_ == RT_MCAST || rt_type_ == RT_LAYER2) {
return DeleteInternal(nh(), 0, 0, false, buf, buf_len);
return DeleteInternal(nh(), 0, 0, false, false, false,
buf, buf_len);
}

// For INET routes, we need to give replacement NH and prefixlen
Expand All @@ -391,7 +392,9 @@ int RouteKSyncEntry::DeleteMsg(char *buf, int buf_len) {
if(ksync_nh && ksync_nh->IsResolved()) {
return DeleteInternal(ksync_nh, route->label(),
route->prefix_len(),
route->proxy_arp(), buf, buf_len);
route->proxy_arp(), route->flood(),
route->wait_for_traffic(),
buf, buf_len);
}
ksync_nh = NULL;
}
Expand All @@ -410,16 +413,20 @@ int RouteKSyncEntry::DeleteMsg(char *buf, int buf_len) {
ksync_nh = static_cast<NHKSyncEntry *>(ksync_nh_object->Find(&nh_key));
}

return DeleteInternal(ksync_nh, 0, 0, false, buf, buf_len);
return DeleteInternal(ksync_nh, 0, 0, false, false, false, buf, buf_len);

}


int RouteKSyncEntry::DeleteInternal(NHKSyncEntry *nexthop, uint32_t lbl,
uint8_t replace_plen, bool proxy_arp,
bool flood_arp, bool wait_for_traffic,
char *buf, int buf_len) {
nh_ = nexthop;
label_ = lbl;
proxy_arp_ = proxy_arp;
flood_ = flood_arp;
wait_for_traffic_ = wait_for_traffic;

KSyncRouteInfo info;
FillObjectLog(sandesh_op::DELETE, info);
Expand Down
6 changes: 5 additions & 1 deletion src/vnsw/agent/ksync/route_ksync.h
Expand Up @@ -34,6 +34,9 @@ class RouteKSyncEntry : public KSyncNetlinkDBEntry {
uint32_t prefix_len() const { return prefix_len_; }
uint32_t label() const { return label_; }
bool proxy_arp() const { return proxy_arp_; }
bool flood() const { return flood_;}
bool wait_for_traffic() const { return wait_for_traffic_;}

NHKSyncEntry* nh() const {
return static_cast<NHKSyncEntry *>(nh_.get());
}
Expand All @@ -53,7 +56,8 @@ class RouteKSyncEntry : public KSyncNetlinkDBEntry {
int Encode(sandesh_op::type op, uint8_t replace_plen,
char *buf, int buf_len);
int DeleteInternal(NHKSyncEntry *nh, uint32_t lbl, uint8_t replace_plen,
bool proxy_arp, char *buf, int buf_len);
bool proxy_arp, bool flood_arp, bool wait_for_traffic,
char *buf, int buf_len);
bool UcIsLess(const KSyncEntry &rhs) const;
bool McIsLess(const KSyncEntry &rhs) const;
bool L2IsLess(const KSyncEntry &rhs) const;
Expand Down

0 comments on commit 9195b58

Please sign in to comment.