summaryrefslogtreecommitdiff
path: root/usr.sbin/bgpd/rde.c
diff options
context:
space:
mode:
authorClaudio Jeker <claudio@cvs.openbsd.org>2004-02-25 19:48:19 +0000
committerClaudio Jeker <claudio@cvs.openbsd.org>2004-02-25 19:48:19 +0000
commitdf1a7268a6cd53132ea8fbe89080e7466ab73bf5 (patch)
tree3805987b5b202d10ebdc2a477b14dd0297e90c89 /usr.sbin/bgpd/rde.c
parentabfefb74998ad9b688a2bb0bbaad99026586b9bb (diff)
Rewrite some parts of the mrt dump handling. It is no longer possible to
dump the filtered updates but therefore it is now possible to dump per neighbor and also to dump the outgoing messages. OK henning@
Diffstat (limited to 'usr.sbin/bgpd/rde.c')
-rw-r--r--usr.sbin/bgpd/rde.c20
1 files changed, 2 insertions, 18 deletions
diff --git a/usr.sbin/bgpd/rde.c b/usr.sbin/bgpd/rde.c
index 36f65314729..29bd7828fa4 100644
--- a/usr.sbin/bgpd/rde.c
+++ b/usr.sbin/bgpd/rde.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rde.c,v 1.85 2004/02/24 15:43:03 claudio Exp $ */
+/* $OpenBSD: rde.c,v 1.86 2004/02/25 19:48:18 claudio Exp $ */
/*
* Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
@@ -69,9 +69,6 @@ struct filter_head *rules_l, *newrules;
struct imsgbuf ibuf_se;
struct imsgbuf ibuf_main;
-int mrt_flagfilter = 0;
-struct mrt_config mrt_filter;
-
void
rde_sighdlr(int sig)
{
@@ -314,25 +311,17 @@ rde_dispatch_imsg_parent(struct imsgbuf *ibuf)
break;
case IMSG_MRT_REQ:
memcpy(&mrt, imsg.data, sizeof(mrt));
- mrt.msgbuf = &ibuf_main.w;
+ mrt.ibuf = &ibuf_main;
if (mrt.type == MRT_TABLE_DUMP) {
mrt_clear_seq();
pt_dump(mrt_dump_upcall, &mrt);
if (imsg_compose(&ibuf_main, IMSG_MRT_END,
mrt.id, NULL, 0) == -1)
fatalx("imsg_compose error");
- } else if (mrt.type == MRT_FILTERED_IN) {
- mrt_flagfilter = 1;
- memcpy(&mrt_filter, &mrt, sizeof(mrt_filter));
}
break;
case IMSG_MRT_END:
- memcpy(&mrt, imsg.data, sizeof(mrt));
/* ignore end message because a dump is atomic */
- if (mrt.type == MRT_FILTERED_IN) {
- mrt_flagfilter = 0;
- bzero(&mrt_filter, sizeof(mrt_filter));
- }
break;
default:
break;
@@ -362,11 +351,6 @@ rde_update_dispatch(struct imsg *imsg)
if (peer->state != PEER_UP)
return (-1); /* peer is not yet up, cannot happen */
- if (mrt_flagfilter == 1)
- mrt_dump_bgp_msg(&mrt_filter, imsg->data,
- imsg->hdr.len - IMSG_HEADER_SIZE, UPDATE,
- &peer->conf, conf);
-
p = imsg->data;
memcpy(&len, p, 2);