inet_ntop(AF_INET6, &attr->srv6_vpn->sid, sid_str, BUFSIZ);
vty_out(vty,
- "\tflags: %" PRIu64" med: %u local_pref: %u origin: %u weight: %u label: %u sid: %s\n",
- attr->flag, attr->med, attr->local_pref, attr->origin,
- attr->weight, attr->label, sid_str);
+ "\tflags: %" PRIu64" distance: %u med: %u local_pref: %u origin: %u weight: %u label: %u sid: %s\n",
+ attr->flag, attr->distance, attr->med, attr->local_pref,
+ attr->origin, attr->weight, attr->label, sid_str);
}
void attr_show_all(struct vty *vty)
/* Redistribute route treatment. */
void bgp_redistribute_add(struct bgp *bgp, struct prefix *p,
const union g_addr *nexthop, ifindex_t ifindex,
- enum nexthop_types_t nhtype, uint32_t metric,
- uint8_t type, unsigned short instance,
- route_tag_t tag)
+ enum nexthop_types_t nhtype, uint8_t distance,
+ uint32_t metric, uint8_t type,
+ unsigned short instance, route_tag_t tag)
{
struct bgp_path_info *new;
struct bgp_path_info *bpi;
attr.nh_ifindex = ifindex;
attr.med = metric;
+ attr.distance = distance;
attr.flag |= ATTR_FLAG_BIT(BGP_ATTR_MULTI_EXIT_DISC);
attr.tag = tag;
extern void bgp_redistribute_add(struct bgp *bgp, struct prefix *p,
const union g_addr *nexthop, ifindex_t ifindex,
- enum nexthop_types_t nhtype, uint32_t metric,
- uint8_t type, unsigned short instance,
- route_tag_t tag);
+ enum nexthop_types_t nhtype, uint8_t distance,
+ uint32_t metric, uint8_t type,
+ unsigned short instance, route_tag_t tag);
extern void bgp_redistribute_delete(struct bgp *, struct prefix *, uint8_t,
unsigned short);
extern void bgp_redistribute_withdraw(struct bgp *, afi_t, int, unsigned short);
/* Now perform the add/update. */
bgp_redistribute_add(bgp, &api.prefix, &nexthop, ifindex,
- nhtype, api.metric, api.type, api.instance,
- api.tag);
+ nhtype, api.distance, api.metric, api.type,
+ api.instance, api.tag);
} else {
bgp_redistribute_delete(bgp, &api.prefix, api.type,
api.instance);