diff options
Diffstat (limited to 'usr.sbin/bgpd')
-rw-r--r-- | usr.sbin/bgpd/rde.c | 8 | ||||
-rw-r--r-- | usr.sbin/bgpd/rde.h | 5 | ||||
-rw-r--r-- | usr.sbin/bgpd/rde_decide.c | 4 |
3 files changed, 11 insertions, 6 deletions
diff --git a/usr.sbin/bgpd/rde.c b/usr.sbin/bgpd/rde.c index 5dc03fda31e..26cc8436413 100644 --- a/usr.sbin/bgpd/rde.c +++ b/usr.sbin/bgpd/rde.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rde.c,v 1.255 2009/06/06 01:00:56 claudio Exp $ */ +/* $OpenBSD: rde.c,v 1.256 2009/06/06 01:02:51 claudio Exp $ */ /* * Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org> @@ -2229,13 +2229,15 @@ rde_up_dump_upcall(struct rib_entry *re, void *ptr) { struct rde_peer *peer = ptr; + if (re->ribid != peer->ribid) + fatalx("King Bula: monsterous evil horror."); if (re->active == NULL) return; up_generate_updates(rules_l, peer, re->active, NULL); } void -rde_generate_updates(struct prefix *new, struct prefix *old) +rde_generate_updates(u_int16_t ribid, struct prefix *new, struct prefix *old) { struct rde_peer *peer; @@ -2250,6 +2252,8 @@ rde_generate_updates(struct prefix *new, struct prefix *old) LIST_FOREACH(peer, &peerlist, peer_l) { if (peer->conf.id == 0) continue; + if (peer->ribid != ribid) + continue; if (peer->state != PEER_UP) continue; up_generate_updates(rules_l, peer, new, old); diff --git a/usr.sbin/bgpd/rde.h b/usr.sbin/bgpd/rde.h index 0b8db538f5c..236b035d07f 100644 --- a/usr.sbin/bgpd/rde.h +++ b/usr.sbin/bgpd/rde.h @@ -1,4 +1,4 @@ -/* $OpenBSD: rde.h,v 1.117 2009/06/04 21:53:43 claudio Exp $ */ +/* $OpenBSD: rde.h,v 1.118 2009/06/06 01:02:51 claudio Exp $ */ /* * Copyright (c) 2003, 2004 Claudio Jeker <claudio@openbsd.org> and @@ -298,7 +298,8 @@ void rde_send_pftable(u_int16_t, struct bgpd_addr *, u_int8_t, int); void rde_send_pftable_commit(void); -void rde_generate_updates(struct prefix *, struct prefix *); +void rde_generate_updates(u_int16_t, struct prefix *, + struct prefix *); u_int32_t rde_local_as(void); int rde_noevaluate(void); int rde_decisionflags(void); diff --git a/usr.sbin/bgpd/rde_decide.c b/usr.sbin/bgpd/rde_decide.c index 58d6b05ec33..d5f4bcfa492 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.55 2009/06/01 21:20:17 claudio Exp $ */ +/* $OpenBSD: rde_decide.c,v 1.56 2009/06/06 01:02:51 claudio Exp $ */ /* * Copyright (c) 2003, 2004 Claudio Jeker <claudio@openbsd.org> @@ -261,7 +261,7 @@ prefix_evaluate(struct prefix *p, struct rib_entry *re) * but remember that xp may be NULL aka ineligible. * Additional decision may be made by the called functions. */ - rde_generate_updates(xp, re->active); + rde_generate_updates(re->ribid, xp, re->active); rde_send_kroute(xp, re->active); re->active = xp; |