mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-13 19:02:58 +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;
|
break;
|
||||||
case NEXTHOP_TYPE_IPV6:
|
case NEXTHOP_TYPE_IPV6:
|
||||||
ret = memcmp(&next1->gate, &next2->gate, sizeof(union g_addr));
|
ret = memcmp(&next1->gate, &next2->gate, sizeof(union g_addr));
|
||||||
if (!ret)
|
if (ret)
|
||||||
return ret;
|
return ret;
|
||||||
break;
|
break;
|
||||||
case NEXTHOP_TYPE_IPV4_IFINDEX:
|
case NEXTHOP_TYPE_IPV4_IFINDEX:
|
||||||
case NEXTHOP_TYPE_IPV6_IFINDEX:
|
case NEXTHOP_TYPE_IPV6_IFINDEX:
|
||||||
ret = memcmp(&next1->gate, &next2->gate, sizeof(union g_addr));
|
ret = memcmp(&next1->gate, &next2->gate, sizeof(union g_addr));
|
||||||
if (!ret)
|
if (ret)
|
||||||
return ret;
|
return ret;
|
||||||
/* Intentional Fall-Through */
|
/* Intentional Fall-Through */
|
||||||
case NEXTHOP_TYPE_IFINDEX:
|
case NEXTHOP_TYPE_IFINDEX:
|
||||||
|
Loading…
Reference in New Issue
Block a user