diff options
| author | Yash Ranjan <ranjany@vmware.com> | 2020-12-10 21:19:55 -0800 |
|---|---|---|
| committer | Yash Ranjan <ranjany@vmware.com> | 2020-12-10 21:25:41 -0800 |
| commit | 08d8fa45877c7e6bdd10933fca9f25ea94927ddc (patch) | |
| tree | 9abd109b0bef229a90b881d2db4abf0a1cf4f4de | |
| parent | 8044f7aa553b22e94608eabbfef818452da2f628 (diff) | |
ospf6d: Fix for "show ipv6 ospf6 database link"
Some prefixes were not shown in the link database
show command, due to issues with pointer calculation.
Signed-off-by: Yash Ranjan <ranjany@vmware.com>
| -rw-r--r-- | ospf6d/ospf6_intra.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/ospf6d/ospf6_intra.c b/ospf6d/ospf6_intra.c index 91945f9791..17538c466a 100644 --- a/ospf6d/ospf6_intra.c +++ b/ospf6d/ospf6_intra.c @@ -609,9 +609,8 @@ static char *ospf6_link_lsa_get_prefix_str(struct ospf6_lsa *lsa, char *buf, return NULL; } - if (cnt < pos) { - current = - start + pos * OSPF6_PREFIX_SIZE(prefix); + if (cnt < (pos - 1)) { + current += OSPF6_PREFIX_SIZE(prefix); cnt++; } else { memset(&in6, 0, sizeof(in6)); |
