diff options
author | Ondrej Zajicek (work) <santiago@crfreenet.org> | 2016-11-15 16:24:39 +0100 |
---|---|---|
committer | Ondrej Zajicek (work) <santiago@crfreenet.org> | 2016-11-15 16:24:39 +0100 |
commit | 261816b0d4f3d4549a4402b95541b82fc7f10a4b (patch) | |
tree | 45fe0676d36e099c02cb44202bddd0bba6875da2 /proto | |
parent | c8cafc8ebb5320ac7c6117c17e6460036f0fdf62 (diff) |
BGP: Cluster list item should be prepended
Commit 3c09af41... changed behavior of int_set_add() from prepend to
append, which makes more sense for community list, but prepend must be
used for cluster list. Add int_set_prepend() and use it in cluster list
handling code.
Diffstat (limited to 'proto')
-rw-r--r-- | proto/bgp/attrs.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/proto/bgp/attrs.c b/proto/bgp/attrs.c index 0309c1f7..aa2a3b46 100644 --- a/proto/bgp/attrs.c +++ b/proto/bgp/attrs.c @@ -1077,7 +1077,7 @@ static inline void bgp_cluster_list_prepend(rte *e, ea_list **attrs, struct linpool *pool, u32 cid) { eattr *a = ea_find(e->attrs->eattrs, EA_CODE(EAP_BGP, BA_CLUSTER_LIST)); - bgp_attach_attr(attrs, pool, BA_CLUSTER_LIST, (uintptr_t) int_set_add(pool, a ? a->u.ptr : NULL, cid)); + bgp_attach_attr(attrs, pool, BA_CLUSTER_LIST, (uintptr_t) int_set_prepend(pool, a ? a->u.ptr : NULL, cid)); } static int |