diff options
author | Claudio Jeker <claudio@cvs.openbsd.org> | 2009-06-06 01:02:52 +0000 |
---|---|---|
committer | Claudio Jeker <claudio@cvs.openbsd.org> | 2009-06-06 01:02:52 +0000 |
commit | 7b467a55243b27419a4d75d2c570e2f7cf5fc2c5 (patch) | |
tree | 721b631f8f5ea61f5195d89ab615fffa9165f55e /usr.sbin/bgpd/rde.c | |
parent | 5e37975094bd6b8cad80fd465595c67896f4a47e (diff) |
Only generate updates for peers that are member of the RIB that update is
comming from.
Diffstat (limited to 'usr.sbin/bgpd/rde.c')
-rw-r--r-- | usr.sbin/bgpd/rde.c | 8 |
1 files changed, 6 insertions, 2 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); |