mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-13 14:42:06 +00:00
ospf6d: Fix for "show ipv6 ospf6 database intra-prefix"
Some prefixes were not shown in the intra-prefix database show command, due to issues with pointer calculation. Signed-off-by: Yash Ranjan <ranjany@vmware.com>
This commit is contained in:
parent
101ad544fa
commit
8044f7aa55
@ -796,7 +796,7 @@ static char *ospf6_intra_prefix_lsa_get_prefix_str(struct ospf6_lsa *lsa,
|
||||
+ sizeof(struct ospf6_lsa_header));
|
||||
|
||||
prefixnum = ntohs(intra_prefix_lsa->prefix_num);
|
||||
if (pos > prefixnum)
|
||||
if ((pos + 1) > prefixnum)
|
||||
return NULL;
|
||||
|
||||
start = (char *)intra_prefix_lsa
|
||||
@ -812,8 +812,7 @@ static char *ospf6_intra_prefix_lsa_get_prefix_str(struct ospf6_lsa *lsa,
|
||||
}
|
||||
|
||||
if (cnt < pos) {
|
||||
current =
|
||||
start + pos * OSPF6_PREFIX_SIZE(prefix);
|
||||
current += OSPF6_PREFIX_SIZE(prefix);
|
||||
cnt++;
|
||||
} else {
|
||||
memset(&in6, 0, sizeof(in6));
|
||||
|
Loading…
Reference in New Issue
Block a user