diff options
author | Claudio Jeker <claudio@cvs.openbsd.org> | 2004-02-27 20:53:57 +0000 |
---|---|---|
committer | Claudio Jeker <claudio@cvs.openbsd.org> | 2004-02-27 20:53:57 +0000 |
commit | c2cf121f1d2db9820dbc07b7c2936029064e98ae (patch) | |
tree | 79b2de76a41864d290666509107d0faf22309985 /usr.sbin/bgpd/rde_decide.c | |
parent | fbea016b8a23b0518ceb0afcad616a711fa34a24 (diff) |
remove unneded peer pointer in struct prefix and change a in_addr_t to
struct in_addr. OK henning@
Diffstat (limited to 'usr.sbin/bgpd/rde_decide.c')
-rw-r--r-- | usr.sbin/bgpd/rde_decide.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/usr.sbin/bgpd/rde_decide.c b/usr.sbin/bgpd/rde_decide.c index f6c76d6255b..4d89e63178d 100644 --- a/usr.sbin/bgpd/rde_decide.c +++ b/usr.sbin/bgpd/rde_decide.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rde_decide.c,v 1.30 2004/02/26 15:46:30 claudio Exp $ */ +/* $OpenBSD: rde_decide.c,v 1.31 2004/02/27 20:53:56 claudio Exp $ */ /* * Copyright (c) 2003, 2004 Claudio Jeker <claudio@openbsd.org> @@ -154,26 +154,26 @@ prefix_cmp(struct prefix *p1, struct prefix *p2) * It is absolutely important that the ebgp value in peer_config.ebgp * is bigger than all other ones (IBGP, confederations) */ - if ((p1->peer->conf.ebgp - p2->peer->conf.ebgp) != 0) { - if (p1->peer->conf.ebgp == 1) /* p1 is EBGP other is lower */ + if ((asp1->peer->conf.ebgp - asp2->peer->conf.ebgp) != 0) { + if (asp1->peer->conf.ebgp == 1) /* p1 is EBGP other is lower */ return 1; - else if (p2->peer->conf.ebgp == 1) /* p2 is EBGP */ + else if (asp2->peer->conf.ebgp == 1) /* p2 is EBGP */ return -1; } /* 7. nexthop costs. NOT YET -> IGNORE */ /* 8. lowest BGP Id wins */ - if ((p2->peer->remote_bgpid - p1->peer->remote_bgpid) != 0) - return (p2->peer->remote_bgpid - p1->peer->remote_bgpid); + if ((asp2->peer->remote_bgpid - asp1->peer->remote_bgpid) != 0) + return (asp2->peer->remote_bgpid - asp1->peer->remote_bgpid); /* 9. lowest peer address wins */ - if (memcmp(&p1->peer->conf.remote_addr, - &p2->peer->conf.remote_addr, - sizeof(p1->peer->conf.remote_addr)) != 0) - return (memcmp(&p1->peer->conf.remote_addr, - &p2->peer->conf.remote_addr, - sizeof(p1->peer->conf.remote_addr))); + if (memcmp(&asp1->peer->conf.remote_addr, + &asp2->peer->conf.remote_addr, + sizeof(asp1->peer->conf.remote_addr)) != 0) + return (memcmp(&asp1->peer->conf.remote_addr, + &asp2->peer->conf.remote_addr, + sizeof(asp1->peer->conf.remote_addr))); fatalx("Uh, oh a politician in the decision process"); |