Skip to content

Commit

Permalink
PBB EVPN changes
Browse files Browse the repository at this point in the history
Rename BgpAttr method leaf to etree_leaf and sticky to evpn_sticky_mac

Change-Id: I307ad2dc6807a00f0269436ac3db19706804e4de
Related-bug: #1645092
  • Loading branch information
bailkeri committed Feb 5, 2017
1 parent f55210d commit a96dc1e
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/bgp/bgp_attr.cc
Expand Up @@ -983,7 +983,7 @@ uint32_t BgpAttr::sequence_number() const {
return 0;
}

bool BgpAttr::sticky() const {
bool BgpAttr::evpn_sticky_mac() const {
if (!ext_community_)
return 0;
for (ExtCommunity::ExtCommunityList::const_iterator it =
Expand All @@ -997,7 +997,7 @@ bool BgpAttr::sticky() const {
return 0;
}

bool BgpAttr::leaf() const {
bool BgpAttr::etree_leaf() const {
if (!ext_community_)
return 0;
for (ExtCommunity::ExtCommunityList::const_iterator it =
Expand Down
4 changes: 2 additions & 2 deletions src/bgp/bgp_attr.h
Expand Up @@ -854,8 +854,8 @@ class BgpAttr {
BgpOListPtr leaf_olist() const { return leaf_olist_; }
BgpAttrDB *attr_db() const { return attr_db_; }
uint32_t sequence_number() const;
bool sticky() const;
bool leaf() const;
bool evpn_sticky_mac() const;
bool etree_leaf() const;
MacAddress mac_address() const;

private:
Expand Down
4 changes: 2 additions & 2 deletions src/bgp/bgp_path.cc
Expand Up @@ -62,10 +62,10 @@ int BgpPath::PathCompare(const BgpPath &rhs, bool allow_ecmp) const {
KEY_COMPARE(rattr->local_pref(), attr_->local_pref());

// ETree Root path first [compare in reverse order]
BOOL_COMPARE(rattr->leaf(), attr_->leaf());
BOOL_COMPARE(rattr->etree_leaf(), attr_->etree_leaf());

// Sticky paths first
BOOL_COMPARE(rattr->sticky(), attr_->sticky());
BOOL_COMPARE(rattr->evpn_sticky_mac(), attr_->evpn_sticky_mac());

// Compare sequence_number in reverse order as larger is better.
KEY_COMPARE(rattr->sequence_number(), attr_->sequence_number());
Expand Down

0 comments on commit a96dc1e

Please sign in to comment.