From: Ondrej Zajicek Date: Fri, 20 Jan 2012 15:20:03 +0000 (+0100) Subject: Fixes a new bug in BGP route ordering. X-Git-Tag: v1.3.6~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3ce17142791b2e1a7f0b8e512b5b74224600056c;p=thirdparty%2Fbird.git Fixes a new bug in BGP route ordering. --- diff --git a/proto/bgp/attrs.c b/proto/bgp/attrs.c index 5a3687836..4495c039b 100644 --- a/proto/bgp/attrs.c +++ b/proto/bgp/attrs.c @@ -1768,12 +1768,11 @@ bgp_get_route_info(rte *e, byte *buf, ea_list *attrs) eattr *o = ea_find(attrs, EA_CODE(EAP_BGP, BA_ORIGIN)); u32 origas; - /* + buf += bsprintf(buf, " (%d", e->pref); + if (e->u.bgp.suppressed) - buf += bsprintf(buf, " -"); - */ + buf += bsprintf(buf, "-"); - buf += bsprintf(buf, " (%d", e->pref); if (e->attrs->hostentry) { if (!rte_resolvable(e)) diff --git a/proto/bgp/packets.c b/proto/bgp/packets.c index 998abb7ba..d3e9b6a12 100644 --- a/proto/bgp/packets.c +++ b/proto/bgp/packets.c @@ -906,6 +906,7 @@ bgp_do_rx_update(struct bgp_conn *conn, rte *e = rte_get_temp(rta_clone(a)); e->net = net_get(p->p.table, prefix, pxlen); e->pflags = 0; + e->u.bgp.suppressed = 0; rte_update(p->p.table, e->net, &p->p, &p->p, e); } else @@ -1024,6 +1025,7 @@ bgp_do_rx_update(struct bgp_conn *conn, rte *e = rte_get_temp(rta_clone(a)); e->net = net_get(p->p.table, prefix, pxlen); e->pflags = 0; + e->u.bgp.suppressed = 0; rte_update(p->p.table, e->net, &p->p, &p->p, e); } else