summaryrefslogtreecommitdiff
path: root/usr.sbin/bgpd/printconf.c
diff options
context:
space:
mode:
authorClaudio Jeker <claudio@cvs.openbsd.org>2004-07-03 17:20:00 +0000
committerClaudio Jeker <claudio@cvs.openbsd.org>2004-07-03 17:20:00 +0000
commit87cfe6e1e9ac329627ea8a97d6f5756ca6acb079 (patch)
tree2f284e8ba9618c7cf05143b38d6876c5aef8e362 /usr.sbin/bgpd/printconf.c
parentf67a7215fd9cb58925ec5da43a2f29466f8ac6a0 (diff)
Switch mrt dumping to fd passing. This gives some speed up when extensive
dumping is done. Acctually mrt dumps were broken because of the fd passing. The nice side effect is a much cleaner code, especially in the parent process. OK henning@
Diffstat (limited to 'usr.sbin/bgpd/printconf.c')
-rw-r--r--usr.sbin/bgpd/printconf.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/usr.sbin/bgpd/printconf.c b/usr.sbin/bgpd/printconf.c
index 95871b3b8c6..8f592d246b3 100644
--- a/usr.sbin/bgpd/printconf.c
+++ b/usr.sbin/bgpd/printconf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: printconf.c,v 1.22 2004/06/20 18:35:12 henning Exp $ */
+/* $OpenBSD: printconf.c,v 1.23 2004/07/03 17:19:59 claudio Exp $ */
/*
* Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
@@ -353,16 +353,17 @@ print_mrt(u_int32_t pid, u_int32_t gid, const char *prep)
if (xmrt_l == NULL)
return;
- LIST_FOREACH(m, xmrt_l, list)
- if ((gid != 0 && m->conf.group_id == gid) ||
- (m->conf.peer_id == pid && m->conf.group_id == gid)) {
- if (m->ReopenTimerInterval == 0)
+ LIST_FOREACH(m, xmrt_l, entry)
+ if ((gid != 0 && m->group_id == gid) ||
+ (m->peer_id == pid && m->group_id == gid)) {
+ if (MRT2MC(m)->ReopenTimerInterval == 0)
printf("%sdump %s %s\n", prep,
- mrt_type(m->conf.type), m->name);
+ mrt_type(m->type), MRT2MC(m)->name);
else
printf("%sdump %s %s %d\n", prep,
- mrt_type(m->conf.type),
- m->name, m->ReopenTimerInterval);
+ mrt_type(m->type),
+ MRT2MC(m)->name,
+ MRT2MC(m)->ReopenTimerInterval);
}
}