net-misc/bird: Fix handling of transitive extended communities
Package-Manager: Portage-2.3.99, Repoman-2.3.22 Signed-off-by: Alarig Le Lay <alarig@swordarmor.fr>
This commit is contained in:
parent
c939c34899
commit
a4367e6481
|
@ -29,6 +29,7 @@ DEPEND="sys-devel/flex
|
||||||
|
|
||||||
PATCHES=(
|
PATCHES=(
|
||||||
"${FILESDIR}/${P}-ipv6-rpki.patch"
|
"${FILESDIR}/${P}-ipv6-rpki.patch"
|
||||||
|
"${FILESDIR}/${P}-attrs.c.patch"
|
||||||
)
|
)
|
||||||
|
|
||||||
src_configure() {
|
src_configure() {
|
||||||
|
|
33
net-misc/bird/files/bird-2.0.7-attrs.c.patch
Normal file
33
net-misc/bird/files/bird-2.0.7-attrs.c.patch
Normal file
|
@ -0,0 +1,33 @@
|
||||||
|
diff --git a/proto/bgp/attrs.c b/proto/bgp/attrs.c
|
||||||
|
index b8921363..9a4e12d2 100644
|
||||||
|
--- a/proto/bgp/attrs.c
|
||||||
|
+++ b/proto/bgp/attrs.c
|
||||||
|
@@ -717,13 +717,23 @@ bgp_decode_mp_unreach_nlri(struct bgp_parse_state *s, uint code UNUSED, uint fla
|
||||||
|
static void
|
||||||
|
bgp_export_ext_community(struct bgp_export_state *s, eattr *a)
|
||||||
|
{
|
||||||
|
- struct adata *ad = ec_set_del_nontrans(s->pool, a->u.ptr);
|
||||||
|
+ if (!s->proto->is_interior)
|
||||||
|
+ {
|
||||||
|
+ struct adata *ad = ec_set_del_nontrans(s->pool, a->u.ptr);
|
||||||
|
|
||||||
|
- if (ad->length == 0)
|
||||||
|
- UNSET(a);
|
||||||
|
+ if (ad->length == 0)
|
||||||
|
+ UNSET(a);
|
||||||
|
|
||||||
|
- ec_set_sort_x(ad);
|
||||||
|
- a->u.ptr = ad;
|
||||||
|
+ ec_set_sort_x(ad);
|
||||||
|
+ a->u.ptr = ad;
|
||||||
|
+ }
|
||||||
|
+ else
|
||||||
|
+ {
|
||||||
|
+ if (a->u.ptr->length == 0)
|
||||||
|
+ UNSET(a);
|
||||||
|
+
|
||||||
|
+ a->u.ptr = ec_set_sort(s->pool, a->u.ptr);
|
||||||
|
+ }
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
Loading…
Reference in a new issue