1
0
mirror of https://github.com/openbsd/src.git synced 2026-04-14 17:24:04 +00:00

Fix CCR ROAIPAddressFamily sort order

RFC 9582 section 4.3.3 defines the canonical form of ipAddrBlocks.

Thanks to Bart Bakker from RIPE NCC for reporting.

OK tb@
This commit is contained in:
job
2026-04-13 09:22:46 +00:00
parent 5118a09c2e
commit 2f26fa0b01

View File

@@ -1,4 +1,4 @@
/* $OpenBSD: ccr.c,v 1.34 2026/04/07 14:38:04 job Exp $ */
/* $OpenBSD: ccr.c,v 1.35 2026/04/13 09:22:46 job Exp $ */
/*
* Copyright (c) 2025 Job Snijders <job@openbsd.org>
*
@@ -832,14 +832,14 @@ ccr_vrp_cmp(const struct vrp *a, const struct vrp *b)
break;
}
if (a->addr.prefixlen < b->addr.prefixlen)
return 1;
if (a->addr.prefixlen > b->addr.prefixlen)
return 1;
if (a->addr.prefixlen < b->addr.prefixlen)
return -1;
if (a->maxlength < b->maxlength)
return 1;
if (a->maxlength > b->maxlength)
return 1;
if (a->maxlength < b->maxlength)
return -1;
return 0;