From 59613300d9ce679fac0375f8df3b89426c8b486e Mon Sep 17 00:00:00 2001 From: Claudio Jeker Date: Thu, 5 Aug 2004 16:26:57 +0000 Subject: struct prefix has a pointer to the peer so use it everywhere directly instead of the detour via aspath. --- usr.sbin/bgpd/rde_update.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'usr.sbin/bgpd/rde_update.c') diff --git a/usr.sbin/bgpd/rde_update.c b/usr.sbin/bgpd/rde_update.c index e44648a443e..d26bd2e30cc 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.24 2004/07/30 14:44:30 claudio Exp $ */ +/* $OpenBSD: rde_update.c,v 1.25 2004/08/05 16:26:56 claudio Exp $ */ /* * Copyright (c) 2004 Claudio Jeker @@ -240,7 +240,7 @@ up_generate_updates(struct rde_peer *peer, /* new prefix got filtered and no old prefex avail */ return; - if (peer == old->aspath->peer) + if (peer == old->peer) /* Do not send routes back to sender */ return; @@ -253,7 +253,7 @@ up_generate_updates(struct rde_peer *peer, */ return; - if (old->aspath->peer->conf.ebgp == 0 && peer->conf.ebgp == 0) { + if (old->peer->conf.ebgp == 0 && peer->conf.ebgp == 0) { /* * route reflector redistribution rules: * 1. if announce is set -> announce @@ -262,7 +262,7 @@ up_generate_updates(struct rde_peer *peer, * 4. old non-client, new client -> yes * 5. old client, new client -> yes */ - if (old->aspath->peer->conf.reflector_client == 0 && + if (old->peer->conf.reflector_client == 0 && peer->conf.reflector_client == 0 && (old->aspath->nexthop->flags & NEXTHOP_ANNOUNCE) == 0) @@ -332,7 +332,7 @@ up_generate_updates(struct rde_peer *peer, if (up_add(peer, p, NULL) == -1) log_warnx("queuing withdraw failed."); } else { - if (peer == new->aspath->peer) { + if (peer == new->peer) { /* Do not send routes back to sender */ up_generate_updates(peer, NULL, old); return; @@ -349,7 +349,7 @@ up_generate_updates(struct rde_peer *peer, return; } - if (new->aspath->peer->conf.ebgp == 0 && peer->conf.ebgp == 0) { + if (new->peer->conf.ebgp == 0 && peer->conf.ebgp == 0) { /* * route reflector redistribution rules: * 1. if announce is set -> announce @@ -358,7 +358,7 @@ up_generate_updates(struct rde_peer *peer, * 4. old non-client, new client -> yes * 5. old client, new client -> yes */ - if (new->aspath->peer->conf.reflector_client == 0 && + if (new->peer->conf.reflector_client == 0 && peer->conf.reflector_client == 0 && (new->aspath->nexthop->flags & NEXTHOP_ANNOUNCE) == 0) { -- cgit v1.2.3