mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-13 19:39:28 +00:00
lib: nexthop-cmp return if gateways don't match
Fix the cmp check the so that it returns the result if the gateways don't match. Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
This commit is contained in:
parent
89dc316029
commit
f932ce865f
@ -92,13 +92,13 @@ int nexthop_cmp(const struct nexthop *next1, const struct nexthop *next2)
|
||||
break;
|
||||
case NEXTHOP_TYPE_IPV6:
|
||||
ret = memcmp(&next1->gate, &next2->gate, sizeof(union g_addr));
|
||||
if (!ret)
|
||||
if (ret)
|
||||
return ret;
|
||||
break;
|
||||
case NEXTHOP_TYPE_IPV4_IFINDEX:
|
||||
case NEXTHOP_TYPE_IPV6_IFINDEX:
|
||||
ret = memcmp(&next1->gate, &next2->gate, sizeof(union g_addr));
|
||||
if (!ret)
|
||||
if (ret)
|
||||
return ret;
|
||||
/* Intentional Fall-Through */
|
||||
case NEXTHOP_TYPE_IFINDEX:
|
||||
|
Loading…
Reference in New Issue
Block a user