From b00d7939be47df0376a5e070ed5e46c7c781c44b Mon Sep 17 00:00:00 2001 From: Christian Franke Date: Tue, 10 Nov 2015 18:33:13 +0100 Subject: [PATCH] isisd: show interface's ipv6 addreses Signed-off-by: Christian Franke Acked-by: Donald Sharp --- isisd/isis_circuit.c | 26 +++++++++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) diff --git a/isisd/isis_circuit.c b/isisd/isis_circuit.c index da25a6bfa7..6363f31ed1 100644 --- a/isisd/isis_circuit.c +++ b/isisd/isis_circuit.c @@ -898,6 +898,10 @@ isis_circuit_print_vty (struct isis_circuit *circuit, struct vty *vty, if (detail == ISIS_UI_LEVEL_DETAIL) { + struct listnode *node; + struct prefix *ip_addr; + u_char buf[BUFSIZ]; + vty_out (vty, " Interface: %s", circuit->interface->name); vty_out (vty, ", State: %s", circuit_state2string (circuit->state)); if (circuit->is_passive) @@ -979,9 +983,6 @@ isis_circuit_print_vty (struct isis_circuit *circuit, struct vty *vty, } if (circuit->ip_addrs && listcount (circuit->ip_addrs) > 0) { - struct listnode *node; - struct prefix *ip_addr; - char buf[PREFIX2STR_BUFFER]; vty_out (vty, " IP Prefix(es):%s", VTY_NEWLINE); for (ALL_LIST_ELEMENTS_RO (circuit->ip_addrs, node, ip_addr)) { @@ -989,6 +990,25 @@ isis_circuit_print_vty (struct isis_circuit *circuit, struct vty *vty, vty_out (vty, " %s%s", buf, VTY_NEWLINE); } } + if (circuit->ipv6_link && listcount(circuit->ipv6_link) > 0) + { + vty_out(vty, " IPv6 Link-Locals:%s", VTY_NEWLINE); + for (ALL_LIST_ELEMENTS_RO(circuit->ipv6_link, node, ip_addr)) + { + prefix2str(ip_addr, (char*)buf, BUFSIZ), + vty_out(vty, " %s%s", buf, VTY_NEWLINE); + } + } + if (circuit->ipv6_link && listcount(circuit->ipv6_non_link) > 0) + { + vty_out(vty, " IPv6 Prefixes:%s", VTY_NEWLINE); + for (ALL_LIST_ELEMENTS_RO(circuit->ipv6_non_link, node, ip_addr)) + { + prefix2str(ip_addr, (char*)buf, BUFSIZ), + vty_out(vty, " %s%s", buf, VTY_NEWLINE); + } + } + vty_out (vty, "%s", VTY_NEWLINE); } return; -- 2.39.5