diff options
author | Claudio Jeker <claudio@cvs.openbsd.org> | 2006-02-08 14:49:59 +0000 |
---|---|---|
committer | Claudio Jeker <claudio@cvs.openbsd.org> | 2006-02-08 14:49:59 +0000 |
commit | 69f56bdc2cebc239c7921b2bc23eea8ce4882c7d (patch) | |
tree | 96ccaac036f1479752bf03e1faec9ab02567495f /usr.sbin | |
parent | 3722ebab3ae85afc180c00f1ca5ad459d277c5e7 (diff) |
For now dump only stuff from the local-RIB into mrt table dumps.
Issue found by Andre Oppermann.
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/bgpd/mrt.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/usr.sbin/bgpd/mrt.c b/usr.sbin/bgpd/mrt.c index d7cb0eb1c96..9fca2272a08 100644 --- a/usr.sbin/bgpd/mrt.c +++ b/usr.sbin/bgpd/mrt.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mrt.c,v 1.49 2006/01/05 16:00:07 claudio Exp $ */ +/* $OpenBSD: mrt.c,v 1.50 2006/02/08 14:49:58 claudio Exp $ */ /* * Copyright (c) 2003, 2004 Claudio Jeker <claudio@openbsd.org> @@ -513,13 +513,17 @@ mrt_dump_upcall(struct pt_entry *pt, void *ptr) * dumps the table so we do the same. If only the active route should * be dumped p should be set to p = pt->active. */ - LIST_FOREACH(p, &pt->prefix_h, prefix_l) + LIST_FOREACH(p, &pt->prefix_h, prefix_l) { + /* for now dump only stuff from the local-RIB */ + if (!(p->flags & F_LOCAL)) + continue; if (mrtbuf->type == MRT_TABLE_DUMP) mrt_dump_entry(mrtbuf, p, sequencenum++, p->aspath->peer); else mrt_dump_entry_mp(mrtbuf, p, sequencenum++, p->aspath->peer); + } } static int |