diff options
author | Henning Brauer <henning@cvs.openbsd.org> | 2004-01-05 16:21:15 +0000 |
---|---|---|
committer | Henning Brauer <henning@cvs.openbsd.org> | 2004-01-05 16:21:15 +0000 |
commit | 6e56adbddd6bb7c2542638e0e08349ba11b0d64e (patch) | |
tree | ab6ee5e37d623046f338fcd313da966ee5dd363c /usr.sbin | |
parent | 7b8f73fbe1bde0f99dfa7d43ba4152624aeb599d (diff) |
allow fib couple/decouple based on an imsg received on the control socket
by the SE and passed on to the main process
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/bgpd/bgpd.c | 14 | ||||
-rw-r--r-- | usr.sbin/bgpd/bgpd.h | 6 | ||||
-rw-r--r-- | usr.sbin/bgpd/control.c | 6 |
3 files changed, 21 insertions, 5 deletions
diff --git a/usr.sbin/bgpd/bgpd.c b/usr.sbin/bgpd/bgpd.c index 2254203a2f0..7b5a712cb75 100644 --- a/usr.sbin/bgpd/bgpd.c +++ b/usr.sbin/bgpd/bgpd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bgpd.c,v 1.53 2004/01/04 19:39:46 henning Exp $ */ +/* $OpenBSD: bgpd.c,v 1.54 2004/01/05 16:21:14 henning Exp $ */ /* * Copyright (c) 2003 Henning Brauer <henning@openbsd.org> @@ -432,6 +432,18 @@ dispatch_imsg(struct imsgbuf *ibuf, int idx, struct mrt_config *conf) else reconfig = 1; break; + case IMSG_CTL_FIB_COUPLE: + if (idx != PFD_PIPE_SESSION) + logit(LOG_CRIT, "couple request not from SE"); + else + kroute_fib_couple(); + break; + case IMSG_CTL_FIB_DECOUPLE: + if (idx != PFD_PIPE_SESSION) + logit(LOG_CRIT, "decouple request not from SE"); + else + kroute_fib_decouple(); + break; default: break; } diff --git a/usr.sbin/bgpd/bgpd.h b/usr.sbin/bgpd/bgpd.h index 0037e2ba3b4..56583a8a33f 100644 --- a/usr.sbin/bgpd/bgpd.h +++ b/usr.sbin/bgpd/bgpd.h @@ -1,4 +1,4 @@ -/* $OpenBSD: bgpd.h,v 1.52 2004/01/04 19:39:46 henning Exp $ */ +/* $OpenBSD: bgpd.h,v 1.53 2004/01/05 16:21:14 henning Exp $ */ /* * Copyright (c) 2003 Henning Brauer <henning@openbsd.org> @@ -180,7 +180,9 @@ enum imsg_type { IMSG_NEXTHOP_UPDATE, IMSG_CTL_SHOW_NEIGHBOR, IMSG_CTL_END, - IMSG_CTL_RELOAD + IMSG_CTL_RELOAD, + IMSG_CTL_FIB_COUPLE, + IMSG_CTL_FIB_DECOUPLE }; struct imsg_hdr { diff --git a/usr.sbin/bgpd/control.c b/usr.sbin/bgpd/control.c index 33c3472dab8..8620c48ca5d 100644 --- a/usr.sbin/bgpd/control.c +++ b/usr.sbin/bgpd/control.c @@ -1,4 +1,4 @@ -/* $OpenBSD: control.c,v 1.9 2004/01/04 19:39:46 henning Exp $ */ +/* $OpenBSD: control.c,v 1.10 2004/01/05 16:21:14 henning Exp $ */ /* * Copyright (c) 2003 Henning Brauer <henning@openbsd.org> @@ -212,7 +212,9 @@ control_dispatch_msg(struct pollfd *pfd, int i) imsg_compose(&c->ibuf, IMSG_CTL_END, 0, NULL, 0); break; case IMSG_CTL_RELOAD: - imsg_compose_parent(IMSG_CTL_RELOAD, 0, NULL, 0); + case IMSG_CTL_FIB_COUPLE: + case IMSG_CTL_FIB_DECOUPLE: + imsg_compose_parent(imsg.hdr.type, 0, NULL, 0); break; default: break; |