diff options
| author | Donald Sharp <sharpd@cumulusnetworks.com> | 2020-03-22 14:50:46 -0400 | 
|---|---|---|
| committer | Donald Sharp <sharpd@cumulusnetworks.com> | 2020-03-22 14:50:46 -0400 | 
| commit | bd494ec5ed8124991be72fe24e61189429d72c2c (patch) | |
| tree | ff15a39bd64fe3ffe85226de552ed0604fa65d17 /bgpd/bgp_evpn_private.h | |
| parent | d03e644c2b4bd4eb4d7be878de5247906e61f420 (diff) | |
bgpd: More `const struct prefix` work
Modify more code to use `const struct prefix` throughout
bgp.  This is all prep work for adding an accessor function
for bgp_node to get the prefix and reduce all the places that
code needs to be touched when we get that work done.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Diffstat (limited to 'bgpd/bgp_evpn_private.h')
| -rw-r--r-- | bgpd/bgp_evpn_private.h | 11 | 
1 files changed, 6 insertions, 5 deletions
diff --git a/bgpd/bgp_evpn_private.h b/bgpd/bgp_evpn_private.h index 76cf8b2cd6..ea1ae087f1 100644 --- a/bgpd/bgp_evpn_private.h +++ b/bgpd/bgp_evpn_private.h @@ -366,7 +366,7 @@ static inline void encode_na_flag_extcomm(struct ecommunity_val *eval,  		eval->val[2] |= ECOMMUNITY_EVPN_SUBTYPE_ND_ROUTER_FLAG;  } -static inline void ip_prefix_from_type5_prefix(struct prefix_evpn *evp, +static inline void ip_prefix_from_type5_prefix(const struct prefix_evpn *evp,  					       struct prefix *ip)  {  	memset(ip, 0, sizeof(struct prefix)); @@ -392,7 +392,7 @@ static inline int is_evpn_prefix_default(const struct prefix *evp)  		1 : 0);  } -static inline void ip_prefix_from_type2_prefix(struct prefix_evpn *evp, +static inline void ip_prefix_from_type2_prefix(const struct prefix_evpn *evp,  					       struct prefix *ip)  {  	memset(ip, 0, sizeof(struct prefix)); @@ -409,7 +409,7 @@ static inline void ip_prefix_from_type2_prefix(struct prefix_evpn *evp,  	}  } -static inline void ip_prefix_from_evpn_prefix(struct prefix_evpn *evp, +static inline void ip_prefix_from_evpn_prefix(const struct prefix_evpn *evp,  					      struct prefix *ip)  {  	if (evp->prefix.route_type == BGP_EVPN_MAC_IP_ROUTE) @@ -432,8 +432,9 @@ static inline void build_evpn_type2_prefix(struct prefix_evpn *p,  		memcpy(&p->prefix.macip_addr.ip, ip, sizeof(*ip));  } -static inline void build_type5_prefix_from_ip_prefix(struct prefix_evpn *evp, -						     struct prefix *ip_prefix) +static inline void +build_type5_prefix_from_ip_prefix(struct prefix_evpn *evp, +				  const struct prefix *ip_prefix)  {  	struct ipaddr ip;  | 
