From 242302ffb2edebd250a7ab10533ba08e0babc59d Mon Sep 17 00:00:00 2001 From: Ryoga Saito Date: Thu, 9 Sep 2021 04:54:06 +0000 Subject: [PATCH] bgpd: show SID structure information Current implementation shows Prefix SID value, so SID structure information also be shown. Signed-off-by: Ryoga Saito --- bgpd/rfapi/rfapi_vty.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/bgpd/rfapi/rfapi_vty.c b/bgpd/rfapi/rfapi_vty.c index 45ef7230b5..6762c2b4a2 100644 --- a/bgpd/rfapi/rfapi_vty.c +++ b/bgpd/rfapi/rfapi_vty.c @@ -435,8 +435,16 @@ void rfapi_vty_out_vncinfo(struct vty *vty, const struct prefix *p, char buf[BUFSIZ]; vty_out(vty, " sid=%s", - inet_ntop(AF_INET6, &bpi->extra->sid[0], buf, - sizeof(buf))); + inet_ntop(AF_INET6, &bpi->extra->sid[0].sid, + buf, sizeof(buf))); + + if (bpi->extra->sid[0].loc_block_len != 0) { + vty_out(vty, " sid_structure=[%d,%d,%d,%d]", + bpi->extra->sid[0].loc_block_len, + bpi->extra->sid[0].loc_node_len, + bpi->extra->sid[0].func_len, + bpi->extra->sid[0].arg_len); + } } } -- 2.39.5