diff options
author | Henning Brauer <henning@cvs.openbsd.org> | 2004-03-10 14:29:38 +0000 |
---|---|---|
committer | Henning Brauer <henning@cvs.openbsd.org> | 2004-03-10 14:29:38 +0000 |
commit | 0f19558f9f07930052353aba7b3d13834b933bca (patch) | |
tree | ac99f12f1b29de9be3d02c507bdddce1308c7224 /usr.sbin | |
parent | 774865b4b4e1e36719b0e4e6a0d46270593e0c64 (diff) |
when we exit try to write out what is left in the msg buffers for the imsg
pipes and clear buffers afterwards
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/bgpd/rde.c | 7 | ||||
-rw-r--r-- | usr.sbin/bgpd/session.c | 7 |
2 files changed, 12 insertions, 2 deletions
diff --git a/usr.sbin/bgpd/rde.c b/usr.sbin/bgpd/rde.c index fabeb4f7700..b82b3ffeac8 100644 --- a/usr.sbin/bgpd/rde.c +++ b/usr.sbin/bgpd/rde.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rde.c,v 1.94 2004/03/05 22:21:32 claudio Exp $ */ +/* $OpenBSD: rde.c,v 1.95 2004/03/10 14:29:37 henning Exp $ */ /* * Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org> @@ -186,6 +186,11 @@ rde_main(struct bgpd_config *config, struct peer *peer_l, rde_update_queue_runner(); } + msgbuf_write(&ibuf_se.w); + msgbuf_clear(&ibuf_se.w); + msgbuf_write(&ibuf_main.w); + msgbuf_clear(&ibuf_main.w); + log_info("route decision engine exiting"); _exit(0); } diff --git a/usr.sbin/bgpd/session.c b/usr.sbin/bgpd/session.c index fbab673f156..61477b44e11 100644 --- a/usr.sbin/bgpd/session.c +++ b/usr.sbin/bgpd/session.c @@ -1,4 +1,4 @@ -/* $OpenBSD: session.c,v 1.129 2004/03/10 13:45:16 henning Exp $ */ +/* $OpenBSD: session.c,v 1.130 2004/03/10 14:29:37 henning Exp $ */ /* * Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org> @@ -348,6 +348,11 @@ session_main(struct bgpd_config *config, struct peer *cpeers, int pipe_m2s[2], for (p = peers; p != NULL; p = p->next) bgp_fsm(p, EVNT_STOP); + msgbuf_write(&ibuf_rde.w); + msgbuf_clear(&ibuf_rde.w); + msgbuf_write(&ibuf_main.w); + msgbuf_clear(&ibuf_main.w); + control_shutdown(); log_info("session engine exiting"); _exit(0); |