diff options
author | Claudio Jeker <claudio@cvs.openbsd.org> | 2004-08-05 16:26:57 +0000 |
---|---|---|
committer | Claudio Jeker <claudio@cvs.openbsd.org> | 2004-08-05 16:26:57 +0000 |
commit | 59613300d9ce679fac0375f8df3b89426c8b486e (patch) | |
tree | dd83848acbc35af47c3fb920346f8d0aa6ac20b3 /usr.sbin/bgpd/rde_update.c | |
parent | 36c0a45ea83f8ca9b3eb87be11b9f95ef180143c (diff) |
struct prefix has a pointer to the peer so use it everywhere directly instead
of the detour via aspath.
Diffstat (limited to 'usr.sbin/bgpd/rde_update.c')
-rw-r--r-- | usr.sbin/bgpd/rde_update.c | 14 |
1 files changed, 7 insertions, 7 deletions
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 <claudio@openbsd.org> @@ -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) { |