mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-05 01:14:48 +00:00
lib: Fix label-stack comparison for nexthops
Use the correct number of octets in the comparison of nexthops' label stacks. Signed-off-by: Mark Stapp <mjs@voltanet.io>
This commit is contained in:
parent
f71e1ff6a9
commit
26dddc01a8
@ -62,7 +62,8 @@ static int _nexthop_labels_cmp(const struct nexthop *nh1,
|
||||
if (nhl1->num_labels < nhl2->num_labels)
|
||||
return -1;
|
||||
|
||||
return memcmp(nhl1->label, nhl2->label, nhl1->num_labels);
|
||||
return memcmp(nhl1->label, nhl2->label,
|
||||
(nhl1->num_labels * sizeof(mpls_label_t)));
|
||||
}
|
||||
|
||||
int nexthop_g_addr_cmp(enum nexthop_types_t type, const union g_addr *addr1,
|
||||
|
Loading…
Reference in New Issue
Block a user