summaryrefslogtreecommitdiff
path: root/usr.sbin/bgpd
diff options
context:
space:
mode:
authorClaudio Jeker <claudio@cvs.openbsd.org>2009-10-30 15:11:01 +0000
committerClaudio Jeker <claudio@cvs.openbsd.org>2009-10-30 15:11:01 +0000
commit3a9ed8e97b4e5f62c3fee5263082206364a755a7 (patch)
tree0c858dd7b84ad3a84de186bb5c8d13cdbe10cf9b /usr.sbin/bgpd
parent23a5863b5bc81e7ea3c42aa6e5a5f27c071ae3ac (diff)
Routers with "transparent-as yes" set should behave more like iBGP ones.
In this case export the MED to all peers no matter what. It is no longer needed to do the set med +0 hack. OK henning@
Diffstat (limited to 'usr.sbin/bgpd')
-rw-r--r--usr.sbin/bgpd/rde_update.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/usr.sbin/bgpd/rde_update.c b/usr.sbin/bgpd/rde_update.c
index 7eba5dd0630..49ef1e52322 100644
--- a/usr.sbin/bgpd/rde_update.c
+++ b/usr.sbin/bgpd/rde_update.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rde_update.c,v 1.69 2009/08/06 08:53:11 claudio Exp $ */
+/* $OpenBSD: rde_update.c,v 1.70 2009/10/30 15:11:00 claudio Exp $ */
/*
* Copyright (c) 2004 Claudio Jeker <claudio@openbsd.org>
@@ -661,9 +661,11 @@ up_generate_attr(struct rde_peer *peer, struct update_attr *upa,
/*
* The old MED from other peers MUST not be announced to others
* unless the MED is originating from us or the peer is an IBGP one.
+ * Only exception are routers with "transparent-as yes" set.
*/
if (a->flags & F_ATTR_MED && (peer->conf.ebgp == 0 ||
- a->flags & F_ATTR_MED_ANNOUNCE)) {
+ a->flags & F_ATTR_MED_ANNOUNCE ||
+ peer->conf.flags & PEERFLAG_TRANS_AS)) {
tmp32 = htonl(a->med);
if ((r = attr_write(up_attr_buf + wlen, len, ATTR_OPTIONAL,
ATTR_MED, &tmp32, 4)) == -1)