mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-11-02 16:25:18 +00:00
bgpd: Cleanup bgp_distance_set|get function names
The bgp_distance_set_node_info and bgp_distance_get_node_info function names were slightly backwards lets fix them up to bgp_node_get_bgp_distance_info and bgp_node_set_bgp_distance_info Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
This commit is contained in:
parent
5a8ba9fc0a
commit
5b00b40eec
@ -11056,12 +11056,12 @@ static int bgp_distance_set(struct vty *vty, const char *distance_str,
|
||||
|
||||
/* Get BGP distance node. */
|
||||
rn = bgp_node_get(bgp_distance_table[afi][safi], (struct prefix *)&p);
|
||||
bdistance = bgp_distance_get_node(rn);
|
||||
bdistance = bgp_node_get_bgp_distance_info(rn);
|
||||
if (bdistance)
|
||||
bgp_unlock_node(rn);
|
||||
else {
|
||||
bdistance = bgp_distance_new();
|
||||
bgp_distance_set_node_info(rn, bdistance);
|
||||
bgp_node_set_bgp_distance_info(rn, bdistance);
|
||||
}
|
||||
|
||||
/* Set distance value. */
|
||||
@ -11106,7 +11106,7 @@ static int bgp_distance_unset(struct vty *vty, const char *distance_str,
|
||||
return CMD_WARNING_CONFIG_FAILED;
|
||||
}
|
||||
|
||||
bdistance = bgp_distance_get_node(rn);
|
||||
bdistance = bgp_node_get_bgp_distance_info(rn);
|
||||
distance = atoi(distance_str);
|
||||
|
||||
if (bdistance->distance != distance) {
|
||||
@ -11145,7 +11145,7 @@ uint8_t bgp_distance_apply(struct prefix *p, struct bgp_path_info *pinfo,
|
||||
sockunion2hostprefix(&peer->su, &q);
|
||||
rn = bgp_node_match(bgp_distance_table[afi][safi], &q);
|
||||
if (rn) {
|
||||
bdistance = bgp_distance_get_node(rn);
|
||||
bdistance = bgp_node_get_bgp_distance_info(rn);
|
||||
bgp_unlock_node(rn);
|
||||
|
||||
if (bdistance->access_list) {
|
||||
@ -11833,7 +11833,7 @@ void bgp_config_write_distance(struct vty *vty, struct bgp *bgp, afi_t afi,
|
||||
|
||||
for (rn = bgp_table_top(bgp_distance_table[afi][safi]); rn;
|
||||
rn = bgp_route_next(rn)) {
|
||||
bdistance = bgp_distance_get_node(rn);
|
||||
bdistance = bgp_node_get_bgp_distance_info(rn);
|
||||
if (bdistance != NULL) {
|
||||
char buf[PREFIX_STRLEN];
|
||||
|
||||
|
||||
@ -331,13 +331,14 @@ bgp_node_set_bgp_aggregate_info(struct bgp_node *node,
|
||||
node->info = aggregate;
|
||||
}
|
||||
|
||||
static inline struct bgp_distance *bgp_distance_get_node(struct bgp_node *node)
|
||||
static inline struct bgp_distance *
|
||||
bgp_node_get_bgp_distance_info(struct bgp_node *node)
|
||||
{
|
||||
return node->info;
|
||||
}
|
||||
|
||||
static inline void bgp_distance_set_node_info(struct bgp_node *node,
|
||||
struct bgp_distance *distance)
|
||||
static inline void bgp_node_set_bgp_distance_info(struct bgp_node *node,
|
||||
struct bgp_distance *distance)
|
||||
{
|
||||
node->info = distance;
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user