Skip to content

Commit

Permalink
bgpd: fix displaying srv6 sid
Browse files Browse the repository at this point in the history
98efa5b ("bgpd: bgp_path_info_extra memory optimization") has removed
SID info from the extra structure.

Do not test for extra presence.

Fixes: 98efa5b ("bgpd: bgp_path_info_extra memory optimization")
Signed-off-by: Louis Scalbert <[email protected]>
(cherry picked from commit 5b24ab9)
Signed-off-by: Louis Scalbert <[email protected]>
  • Loading branch information
louis-6wind committed Feb 6, 2024
1 parent 87b69cd commit 9db2a37
Showing 1 changed file with 14 additions and 15 deletions.
29 changes: 14 additions & 15 deletions bgpd/rfapi/rfapi_vty.c
Original file line number Diff line number Diff line change
Expand Up @@ -419,22 +419,21 @@ void rfapi_vty_out_vncinfo(struct vty *vty, const struct prefix *p,
else
vty_out(vty, " label=%u",
decode_label(&bpi->extra->label[0]));
}

if (bpi->attr->srv6_l3vpn || bpi->attr->srv6_vpn) {
struct in6_addr *sid_tmp =
bpi->attr->srv6_l3vpn
? (&bpi->attr->srv6_l3vpn->sid)
: (&bpi->attr->srv6_vpn->sid);
vty_out(vty, " sid=%pI6", sid_tmp);

if (bpi->attr->srv6_l3vpn &&
bpi->attr->srv6_l3vpn->loc_block_len != 0) {
vty_out(vty, " sid_structure=[%d,%d,%d,%d]",
bpi->attr->srv6_l3vpn->loc_block_len,
bpi->attr->srv6_l3vpn->loc_node_len,
bpi->attr->srv6_l3vpn->func_len,
bpi->attr->srv6_l3vpn->arg_len);
}
if (bpi->attr->srv6_l3vpn || bpi->attr->srv6_vpn) {
struct in6_addr *sid_tmp =
bpi->attr->srv6_l3vpn ? (&bpi->attr->srv6_l3vpn->sid)
: (&bpi->attr->srv6_vpn->sid);
vty_out(vty, " sid=%pI6", sid_tmp);

if (bpi->attr->srv6_l3vpn &&
bpi->attr->srv6_l3vpn->loc_block_len != 0) {
vty_out(vty, " sid_structure=[%d,%d,%d,%d]",
bpi->attr->srv6_l3vpn->loc_block_len,
bpi->attr->srv6_l3vpn->loc_node_len,
bpi->attr->srv6_l3vpn->func_len,
bpi->attr->srv6_l3vpn->arg_len);
}
}

Expand Down

0 comments on commit 9db2a37

Please sign in to comment.