summaryrefslogtreecommitdiff
path: root/usr.sbin/bgpd/session.c
diff options
context:
space:
mode:
authorHenning Brauer <henning@cvs.openbsd.org>2004-01-09 13:47:09 +0000
committerHenning Brauer <henning@cvs.openbsd.org>2004-01-09 13:47:09 +0000
commit715650b30ccfc3f0aa534bc491db3fab23f000c1 (patch)
tree2d98a017e1af53f36e45edd0cc711283193de8de /usr.sbin/bgpd/session.c
parent7333e1e290962bbaaf8ff960f0c9c46a44ada85c (diff)
get us a stateful imsg relaying framework, and the first receiver,
IMSG_CTL_KROUTE, to have the kroute structs forming the fib sent to a control socket. ok claudio@
Diffstat (limited to 'usr.sbin/bgpd/session.c')
-rw-r--r--usr.sbin/bgpd/session.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/usr.sbin/bgpd/session.c b/usr.sbin/bgpd/session.c
index 1bb6355c5f6..1a3fc706951 100644
--- a/usr.sbin/bgpd/session.c
+++ b/usr.sbin/bgpd/session.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: session.c,v 1.75 2004/01/09 13:38:39 henning Exp $ */
+/* $OpenBSD: session.c,v 1.76 2004/01/09 13:47:08 henning Exp $ */
/*
* Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
@@ -1410,6 +1410,11 @@ session_dispatch_imsg(struct imsgbuf *ibuf, int idx)
bzero(&mrt_allin, sizeof(mrt_allin));
}
break;
+ case IMSG_CTL_KROUTE:
+ case IMSG_CTL_END:
+ if (idx != PFD_PIPE_MAIN)
+ fatalx("reconf request not from parent");
+ control_imsg_relay(&imsg);
default:
break;
}
@@ -1449,7 +1454,7 @@ session_up(struct peer *peer)
}
int
-imsg_compose_parent(int type, u_int32_t peerid, void *data, u_int16_t datalen)
+imsg_compose_parent(int type, pid_t pid, void *data, u_int16_t datalen)
{
- return (imsg_compose(&ibuf_main, type, peerid, data, datalen));
+ return (imsg_compose_pid(&ibuf_main, type, pid, data, datalen));
}