summaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/dhcpd/pfutils.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/usr.sbin/dhcpd/pfutils.c b/usr.sbin/dhcpd/pfutils.c
index 8e385ab5b87..7f11185744a 100644
--- a/usr.sbin/dhcpd/pfutils.c
+++ b/usr.sbin/dhcpd/pfutils.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pfutils.c,v 1.12 2015/01/21 21:50:33 deraadt Exp $ */
+/* $OpenBSD: pfutils.c,v 1.13 2015/02/05 09:42:52 krw Exp $ */
/*
* Copyright (c) 2006 Chris Kuethe <ckuethe@openbsd.org>
*
@@ -73,6 +73,9 @@ pftable_handler()
if (errno != EINTR)
error("poll: %m");
+ if (nfds > 0 && (pfd[0].revents & POLLHUP))
+ error("pf pipe closed");
+
if (nfds > 0 && (pfd[0].revents & POLLIN)) {
bzero(&cmd, l);
r = atomicio(read, pfpipe[0], &cmd, l);