summaryrefslogtreecommitdiff
path: root/usr.sbin/bgpd/bgpd.c
diff options
context:
space:
mode:
authorClaudio Jeker <claudio@cvs.openbsd.org>2005-12-24 14:11:14 +0000
committerClaudio Jeker <claudio@cvs.openbsd.org>2005-12-24 14:11:14 +0000
commitad24c480eadca34d15833f5c58e63f035ab98b99 (patch)
tree99ae8e8f6a02c269ee2fed7b2e1d0de6cf9eaac1 /usr.sbin/bgpd/bgpd.c
parent93c369d3e0a5ff06da3d7baceb1ff172668e1ff0 (diff)
bzero the pfd array before setting it up and calling poll because on error
(e.g. EINTR) poll() will not update the pfd array (copyout) and so the old revents are used and results in a blocking parent process. OK dlg@
Diffstat (limited to 'usr.sbin/bgpd/bgpd.c')
-rw-r--r--usr.sbin/bgpd/bgpd.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/usr.sbin/bgpd/bgpd.c b/usr.sbin/bgpd/bgpd.c
index 5de219abe01..8f9de80e839 100644
--- a/usr.sbin/bgpd/bgpd.c
+++ b/usr.sbin/bgpd/bgpd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: bgpd.c,v 1.126 2005/11/02 15:03:02 claudio Exp $ */
+/* $OpenBSD: bgpd.c,v 1.127 2005/12/24 14:11:13 claudio Exp $ */
/*
* Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
@@ -252,6 +252,7 @@ main(int argc, char *argv[])
mrt_reconfigure(&mrt_l);
while (quit == 0) {
+ bzero(pfd, sizeof(pfd));
pfd[PFD_PIPE_SESSION].fd = ibuf_se->fd;
pfd[PFD_PIPE_SESSION].events = POLLIN;
if (ibuf_se->w.queued)