summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorclaudio <claudio@openbsd.org>2009-10-30 15:11:00 +0000
committerclaudio <claudio@openbsd.org>2009-10-30 15:11:00 +0000
commit76b13a64e5b5ddc96fbb4a672acab5fc39008038 (patch)
tree96054b56a011926382fe3ea7c295d1c348ebd71b
parentstop using kqueue. (diff)
downloadwireguard-openbsd-76b13a64e5b5ddc96fbb4a672acab5fc39008038.tar.xz
wireguard-openbsd-76b13a64e5b5ddc96fbb4a672acab5fc39008038.zip
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@
-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)