mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-07 17:18:56 +00:00
bgpd: Use %pI6 to print SRv6 VPN SIDs
Use %pI6 to print the SRv6 VPN SIDs in bgpd VTY. Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
This commit is contained in:
parent
a00621d8b9
commit
1830895a79
@ -9631,11 +9631,7 @@ DEFPY (show_bgp_srv6,
|
|||||||
struct listnode *node;
|
struct listnode *node;
|
||||||
struct srv6_locator_chunk *chunk;
|
struct srv6_locator_chunk *chunk;
|
||||||
struct bgp_srv6_function *func;
|
struct bgp_srv6_function *func;
|
||||||
struct in6_addr *tovpn4_sid;
|
|
||||||
struct in6_addr *tovpn6_sid;
|
|
||||||
char buf[256];
|
char buf[256];
|
||||||
char buf_tovpn4_sid[256];
|
|
||||||
char buf_tovpn6_sid[256];
|
|
||||||
|
|
||||||
bgp = bgp_get_default();
|
bgp = bgp_get_default();
|
||||||
if (!bgp)
|
if (!bgp)
|
||||||
@ -9658,19 +9654,10 @@ DEFPY (show_bgp_srv6,
|
|||||||
vty_out(vty, "- name: %s\n",
|
vty_out(vty, "- name: %s\n",
|
||||||
bgp->name ? bgp->name : "default");
|
bgp->name ? bgp->name : "default");
|
||||||
|
|
||||||
tovpn4_sid = bgp->vpn_policy[AFI_IP].tovpn_sid;
|
vty_out(vty, " vpn_policy[AFI_IP].tovpn_sid: %pI6\n",
|
||||||
tovpn6_sid = bgp->vpn_policy[AFI_IP6].tovpn_sid;
|
bgp->vpn_policy[AFI_IP].tovpn_sid);
|
||||||
if (tovpn4_sid)
|
vty_out(vty, " vpn_policy[AFI_IP6].tovpn_sid: %pI6\n",
|
||||||
inet_ntop(AF_INET6, tovpn4_sid, buf_tovpn4_sid,
|
bgp->vpn_policy[AFI_IP6].tovpn_sid);
|
||||||
sizeof(buf_tovpn4_sid));
|
|
||||||
if (tovpn6_sid)
|
|
||||||
inet_ntop(AF_INET6, tovpn6_sid, buf_tovpn6_sid,
|
|
||||||
sizeof(buf_tovpn6_sid));
|
|
||||||
|
|
||||||
vty_out(vty, " vpn_policy[AFI_IP].tovpn_sid: %s\n",
|
|
||||||
tovpn4_sid ? buf_tovpn4_sid : "none");
|
|
||||||
vty_out(vty, " vpn_policy[AFI_IP6].tovpn_sid: %s\n",
|
|
||||||
tovpn6_sid ? buf_tovpn6_sid : "none");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return CMD_SUCCESS;
|
return CMD_SUCCESS;
|
||||||
|
Loading…
Reference in New Issue
Block a user