summaryrefslogtreecommitdiff
path: root/usr.sbin/bgpd/session.c
diff options
context:
space:
mode:
authorClaudio Jeker <claudio@cvs.openbsd.org>2010-05-03 13:09:39 +0000
committerClaudio Jeker <claudio@cvs.openbsd.org>2010-05-03 13:09:39 +0000
commitbb2e97a20c38b13f273faf0b79dff73651982b4d (patch)
tree2d2f533b8681f808a66efdb57f5974b0dbb4b0c9 /usr.sbin/bgpd/session.c
parent3237932c136a2acb4eb09366a457cf3f67ca5e8e (diff)
Make it possible to load multiple routing tables at the same time and use
those for alternate RIBs. This allows to use "rde rib TESTIT rtable 1". NOTE: nexthop verification has changed for alternate tables. For now nexthop will only be verified against the main routing table (id 0). Because of this "nexthop qualify via bgp" may now compare the nexthops against bgpd routes from a different RIB. Tested by sthen@, OK to move on by henning@
Diffstat (limited to 'usr.sbin/bgpd/session.c')
-rw-r--r--usr.sbin/bgpd/session.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/usr.sbin/bgpd/session.c b/usr.sbin/bgpd/session.c
index c6222e07cf6..858896adac2 100644
--- a/usr.sbin/bgpd/session.c
+++ b/usr.sbin/bgpd/session.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: session.c,v 1.307 2010/04/16 12:24:25 claudio Exp $ */
+/* $OpenBSD: session.c,v 1.308 2010/05/03 13:09:38 claudio Exp $ */
/*
* Copyright (c) 2003, 2004, 2005 Henning Brauer <henning@openbsd.org>
@@ -2361,7 +2361,6 @@ session_dispatch_imsg(struct imsgbuf *ibuf, int idx, u_int *listener_cnt)
fatalx("got IMSG_RECONF_DONE but no config");
conf->flags = nconf->flags;
conf->log = nconf->log;
- conf->rtableid = nconf->rtableid;
conf->bgpid = nconf->bgpid;
conf->clusterid = nconf->clusterid;
conf->as = nconf->as;
@@ -2488,6 +2487,7 @@ session_dispatch_imsg(struct imsgbuf *ibuf, int idx, u_int *listener_cnt)
case IMSG_CTL_KROUTE_ADDR:
case IMSG_CTL_SHOW_NEXTHOP:
case IMSG_CTL_SHOW_INTERFACE:
+ case IMSG_CTL_SHOW_FIB_TABLES:
if (idx != PFD_PIPE_MAIN)
fatalx("ctl kroute request not from parent");
control_imsg_relay(&imsg);
@@ -2765,9 +2765,10 @@ session_up(struct peer *p)
}
int
-imsg_compose_parent(int type, pid_t pid, void *data, u_int16_t datalen)
+imsg_compose_parent(int type, u_int32_t peerid, pid_t pid, void *data,
+ u_int16_t datalen)
{
- return (imsg_compose(ibuf_main, type, 0, pid, -1, data, datalen));
+ return (imsg_compose(ibuf_main, type, peerid, pid, -1, data, datalen));
}
int