Skip to content

Commit b5ab7fc

Browse files
committed
lib, bgpd: Rename evpn_type5_prefix_match to _contains
This is a network check to see if the first parameter contains the second parameter. Let's name it better. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
1 parent f53674c commit b5ab7fc

3 files changed

Lines changed: 4 additions & 5 deletions

File tree

bgpd/bgp_route.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14975,8 +14975,7 @@ static int bgp_show_route_in_table(struct vty *vty, struct bgp *bgp, struct bgp_
1497514975
* Get prefixlen of the ip-prefix within type5
1497614976
* evpn route
1497714977
*/
14978-
if (evpn_type5_prefix_match(rm_p, &match)
14979-
&& rm->info) {
14978+
if (evpn_type5_prefix_contains(rm_p, &match) && rm->info) {
1498014979
longest_pfx = rm;
1498114980
int type5_pfxlen =
1498214981
bgp_evpn_get_type5_prefixlen(

lib/prefix.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ int prefix_contains(union prefixconstptr unetwork, union prefixconstptr uprefix)
249249
* ip-prefix within n which matches prefix p
250250
* If n includes p prefix then return 1 else return 0.
251251
*/
252-
int evpn_type5_prefix_match(const struct prefix *n, const struct prefix *p)
252+
int evpn_type5_prefix_contains(const struct prefix *n, const struct prefix *p)
253253
{
254254
int offset;
255255
int shift;

lib/prefix.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -419,8 +419,8 @@ extern void prefix_mcast_ip_dump(const char *onfail, const struct ipaddr *addr,
419419
extern const char *prefix_sg2str(const struct prefix_sg *sg, char *str);
420420
extern const char *prefix2str(union prefixconstptr upfx, char *buffer,
421421
int size);
422-
extern int evpn_type5_prefix_match(const struct prefix *evpn_pfx,
423-
const struct prefix *match_pfx);
422+
extern int evpn_type5_prefix_contains(const struct prefix *evpn_network_pfx,
423+
const struct prefix *match_pfx);
424424
extern int prefix_contains(union prefixconstptr unetwork, union prefixconstptr uprefix);
425425
extern int prefix_match_network_statement(union prefixconstptr unet,
426426
union prefixconstptr upfx);

0 commit comments

Comments
 (0)