mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-06-14 18:35:31 +00:00
Merge pull request #9324 from donaldsharp/bgp_info_cmp
bgpd: Store distance received from a redistribute statement
This commit is contained in:
commit
d04e7788c1
@ -789,9 +789,9 @@ static void attr_show_all_iterator(struct hash_bucket *bucket, struct vty *vty)
|
|||||||
inet_ntop(AF_INET6, &attr->srv6_vpn->sid, sid_str, BUFSIZ);
|
inet_ntop(AF_INET6, &attr->srv6_vpn->sid, sid_str, BUFSIZ);
|
||||||
|
|
||||||
vty_out(vty,
|
vty_out(vty,
|
||||||
"\tflags: %" PRIu64" med: %u local_pref: %u origin: %u weight: %u label: %u sid: %s\n",
|
"\tflags: %" PRIu64" distance: %u med: %u local_pref: %u origin: %u weight: %u label: %u sid: %s\n",
|
||||||
attr->flag, attr->med, attr->local_pref, attr->origin,
|
attr->flag, attr->distance, attr->med, attr->local_pref,
|
||||||
attr->weight, attr->label, sid_str);
|
attr->origin, attr->weight, attr->label, sid_str);
|
||||||
}
|
}
|
||||||
|
|
||||||
void attr_show_all(struct vty *vty)
|
void attr_show_all(struct vty *vty)
|
||||||
|
@ -8063,9 +8063,9 @@ DEFPY(aggregate_addressv6, aggregate_addressv6_cmd,
|
|||||||
/* Redistribute route treatment. */
|
/* Redistribute route treatment. */
|
||||||
void bgp_redistribute_add(struct bgp *bgp, struct prefix *p,
|
void bgp_redistribute_add(struct bgp *bgp, struct prefix *p,
|
||||||
const union g_addr *nexthop, ifindex_t ifindex,
|
const union g_addr *nexthop, ifindex_t ifindex,
|
||||||
enum nexthop_types_t nhtype, uint32_t metric,
|
enum nexthop_types_t nhtype, uint8_t distance,
|
||||||
uint8_t type, unsigned short instance,
|
uint32_t metric, uint8_t type,
|
||||||
route_tag_t tag)
|
unsigned short instance, route_tag_t tag)
|
||||||
{
|
{
|
||||||
struct bgp_path_info *new;
|
struct bgp_path_info *new;
|
||||||
struct bgp_path_info *bpi;
|
struct bgp_path_info *bpi;
|
||||||
@ -8112,6 +8112,7 @@ void bgp_redistribute_add(struct bgp *bgp, struct prefix *p,
|
|||||||
attr.nh_ifindex = ifindex;
|
attr.nh_ifindex = ifindex;
|
||||||
|
|
||||||
attr.med = metric;
|
attr.med = metric;
|
||||||
|
attr.distance = distance;
|
||||||
attr.flag |= ATTR_FLAG_BIT(BGP_ATTR_MULTI_EXIT_DISC);
|
attr.flag |= ATTR_FLAG_BIT(BGP_ATTR_MULTI_EXIT_DISC);
|
||||||
attr.tag = tag;
|
attr.tag = tag;
|
||||||
|
|
||||||
|
@ -641,9 +641,9 @@ extern bool bgp_maximum_prefix_overflow(struct peer *, afi_t, safi_t, int);
|
|||||||
|
|
||||||
extern void bgp_redistribute_add(struct bgp *bgp, struct prefix *p,
|
extern void bgp_redistribute_add(struct bgp *bgp, struct prefix *p,
|
||||||
const union g_addr *nexthop, ifindex_t ifindex,
|
const union g_addr *nexthop, ifindex_t ifindex,
|
||||||
enum nexthop_types_t nhtype, uint32_t metric,
|
enum nexthop_types_t nhtype, uint8_t distance,
|
||||||
uint8_t type, unsigned short instance,
|
uint32_t metric, uint8_t type,
|
||||||
route_tag_t tag);
|
unsigned short instance, route_tag_t tag);
|
||||||
extern void bgp_redistribute_delete(struct bgp *, struct prefix *, uint8_t,
|
extern void bgp_redistribute_delete(struct bgp *, struct prefix *, uint8_t,
|
||||||
unsigned short);
|
unsigned short);
|
||||||
extern void bgp_redistribute_withdraw(struct bgp *, afi_t, int, unsigned short);
|
extern void bgp_redistribute_withdraw(struct bgp *, afi_t, int, unsigned short);
|
||||||
|
@ -517,8 +517,8 @@ static int zebra_read_route(ZAPI_CALLBACK_ARGS)
|
|||||||
|
|
||||||
/* Now perform the add/update. */
|
/* Now perform the add/update. */
|
||||||
bgp_redistribute_add(bgp, &api.prefix, &nexthop, ifindex,
|
bgp_redistribute_add(bgp, &api.prefix, &nexthop, ifindex,
|
||||||
nhtype, api.metric, api.type, api.instance,
|
nhtype, api.distance, api.metric, api.type,
|
||||||
api.tag);
|
api.instance, api.tag);
|
||||||
} else {
|
} else {
|
||||||
bgp_redistribute_delete(bgp, &api.prefix, api.type,
|
bgp_redistribute_delete(bgp, &api.prefix, api.type,
|
||||||
api.instance);
|
api.instance);
|
||||||
|
Loading…
Reference in New Issue
Block a user