diff options
author | hasso <hasso> | 2003-12-23 11:51:08 +0000 |
---|---|---|
committer | hasso <hasso> | 2003-12-23 11:51:08 +0000 |
commit | 2097cd8a7a1322b2853f1b9cbbe7f39c436f553e (patch) | |
tree | ab849230440ac6429f6d2caea41d36cb893f0c8d /isisd/isis_lsp.c | |
parent | 5a514b14c706d671a041862c072af08a2baab98e (diff) | |
download | quagga-2097cd8a7a1322b2853f1b9cbbe7f39c436f553e.tar.bz2 quagga-2097cd8a7a1322b2853f1b9cbbe7f39c436f553e.tar.xz |
Some fixes to isisd done by me and Cougar in the spring of 2003. See
changelog for details.
Diffstat (limited to 'isisd/isis_lsp.c')
-rw-r--r-- | isisd/isis_lsp.c | 39 |
1 files changed, 37 insertions, 2 deletions
diff --git a/isisd/isis_lsp.c b/isisd/isis_lsp.c index f797b9e6..3f6a57b9 100644 --- a/isisd/isis_lsp.c +++ b/isisd/isis_lsp.c @@ -764,7 +764,7 @@ lsp_print_detail (dnode_t *node, struct vty *vty, char dynhost) if (lsp->tlv_data.ipv4_addrs) { LIST_LOOP(lsp->tlv_data.ipv4_addrs, ipv4_addr, lnode) { - memcpy (ipv4_address, inet_ntoa (*ipv4_addr), sizeof (ipv4_addr)); + memcpy (ipv4_address, inet_ntoa (*ipv4_addr), sizeof (ipv4_address)); vty_out (vty, " IP: %s%s", ipv4_address, VTY_NEWLINE); @@ -776,7 +776,19 @@ lsp_print_detail (dnode_t *node, struct vty *vty, char dynhost) LIST_LOOP(lsp->tlv_data.ipv4_int_reachs, ipv4_reach, lnode) { memcpy (ipv4_reach_prefix, inet_ntoa (ipv4_reach->prefix), sizeof (ipv4_reach_prefix)); memcpy (ipv4_reach_mask, inet_ntoa (ipv4_reach->mask), sizeof (ipv4_reach_mask)); - vty_out (vty, " Matric: %d IP %s %s%s", + vty_out (vty, " Metric: %d IP %s %s%s", + ipv4_reach->metrics.metric_default, + ipv4_reach_prefix, + ipv4_reach_mask, + VTY_NEWLINE); + } + + /* for the external reachable tlv */ + if (lsp->tlv_data.ipv4_ext_reachs) + LIST_LOOP(lsp->tlv_data.ipv4_ext_reachs, ipv4_reach, lnode) { + memcpy (ipv4_reach_prefix, inet_ntoa (ipv4_reach->prefix), sizeof (ipv4_reach_prefix)); + memcpy (ipv4_reach_mask, inet_ntoa (ipv4_reach->mask), sizeof (ipv4_reach_mask)); + vty_out (vty, " Metric: %d IP-External %s %s%s", ipv4_reach->metrics.metric_default, ipv4_reach_prefix, ipv4_reach_mask, @@ -794,6 +806,29 @@ lsp_print_detail (dnode_t *node, struct vty *vty, char dynhost) } } + /* IPv6 tlv */ +#ifdef HAVE_IPV6 + if (lsp->tlv_data.ipv6_reachs) + LIST_LOOP(lsp->tlv_data.ipv6_reachs, ipv6_reach, lnode) { + memset(&in6, 0, sizeof(in6)); + memcpy (in6.s6_addr, ipv6_reach->prefix, PSIZE(ipv6_reach->prefix_len)); + inet_ntop (AF_INET6, &in6, buff, BUFSIZ); + if ((ipv6_reach->control_info && + CTRL_INFO_DISTRIBUTION) == DISTRIBUTION_INTERNAL) + vty_out (vty, " Metric: %d IPv6-Intern %s/%d%s", + ntohl (ipv6_reach->metric), + buff, + ipv6_reach->prefix_len, + VTY_NEWLINE); + else + vty_out (vty, " Metric: %d IPv6-Extern %s/%d%s", + ntohl (ipv6_reach->metric), + buff, + ipv6_reach->prefix_len, + VTY_NEWLINE); + } +#endif + /* FIXME: Other tlvs such as te or external tlv will be added later */ #if 0 vty_out (vty, "%s %s %c%s", |