From 3a9ed8e97b4e5f62c3fee5263082206364a755a7 Mon Sep 17 00:00:00 2001 From: Claudio Jeker Date: Fri, 30 Oct 2009 15:11:01 +0000 Subject: 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@ --- usr.sbin/bgpd/rde_update.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'usr.sbin/bgpd') 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 @@ -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) -- cgit v1.2.3