mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-07-09 09:47:11 +00:00
Merge pull request #7713 from ranjanyash54/2371
ospf6d: Fix the prefix walking for show database command for intra-prefix and link
This commit is contained in:
commit
06ee6e6dee
@ -609,9 +609,8 @@ static char *ospf6_link_lsa_get_prefix_str(struct ospf6_lsa *lsa, char *buf,
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (cnt < pos) {
|
if (cnt < (pos - 1)) {
|
||||||
current =
|
current += OSPF6_PREFIX_SIZE(prefix);
|
||||||
start + pos * OSPF6_PREFIX_SIZE(prefix);
|
|
||||||
cnt++;
|
cnt++;
|
||||||
} else {
|
} else {
|
||||||
memset(&in6, 0, sizeof(in6));
|
memset(&in6, 0, sizeof(in6));
|
||||||
@ -796,7 +795,7 @@ static char *ospf6_intra_prefix_lsa_get_prefix_str(struct ospf6_lsa *lsa,
|
|||||||
+ sizeof(struct ospf6_lsa_header));
|
+ sizeof(struct ospf6_lsa_header));
|
||||||
|
|
||||||
prefixnum = ntohs(intra_prefix_lsa->prefix_num);
|
prefixnum = ntohs(intra_prefix_lsa->prefix_num);
|
||||||
if (pos > prefixnum)
|
if ((pos + 1) > prefixnum)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
start = (char *)intra_prefix_lsa
|
start = (char *)intra_prefix_lsa
|
||||||
@ -812,8 +811,7 @@ static char *ospf6_intra_prefix_lsa_get_prefix_str(struct ospf6_lsa *lsa,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (cnt < pos) {
|
if (cnt < pos) {
|
||||||
current =
|
current += OSPF6_PREFIX_SIZE(prefix);
|
||||||
start + pos * OSPF6_PREFIX_SIZE(prefix);
|
|
||||||
cnt++;
|
cnt++;
|
||||||
} else {
|
} else {
|
||||||
memset(&in6, 0, sizeof(in6));
|
memset(&in6, 0, sizeof(in6));
|
||||||
|
Loading…
Reference in New Issue
Block a user