From d807ea087f8d60e25eaef8c10168a40ca6545c57 Mon Sep 17 00:00:00 2001 From: "Ondrej Zajicek (work)" Date: Wed, 13 Dec 2017 15:57:44 +0100 Subject: BGP: Fix non-transitive ext communities --- nest/a-set.c | 7 +++++++ nest/attrs.h | 2 ++ 2 files changed, 9 insertions(+) (limited to 'nest') diff --git a/nest/a-set.c b/nest/a-set.c index a2fb6953..048e522d 100644 --- a/nest/a-set.c +++ b/nest/a-set.c @@ -536,6 +536,13 @@ ec_set_sort(struct linpool *pool, struct adata *src) return dst; } +void +ec_set_sort_x(struct adata *set) +{ + /* Sort in place */ + qsort(set->data, set->length / 8, 8, ec_set_cmp); +} + static int lc_set_cmp(const void *X, const void *Y) diff --git a/nest/attrs.h b/nest/attrs.h index f66d4f04..102f378a 100644 --- a/nest/attrs.h +++ b/nest/attrs.h @@ -197,4 +197,6 @@ struct adata *int_set_sort(struct linpool *pool, struct adata *src); struct adata *ec_set_sort(struct linpool *pool, struct adata *src); struct adata *lc_set_sort(struct linpool *pool, struct adata *src); +void ec_set_sort_x(struct adata *set); /* Sort in place */ + #endif -- cgit v1.2.3