diff options
author | 2015-02-05 09:42:52 +0000 | |
---|---|---|
committer | 2015-02-05 09:42:52 +0000 | |
commit | 7597658634e050ffdda5238893fffec634272ff6 (patch) | |
tree | 79e7c01b754f06e250aaf15d398a4eaf481d710a | |
parent | unbreak the tree, oups (diff) | |
download | wireguard-openbsd-7597658634e050ffdda5238893fffec634272ff6.tar.xz wireguard-openbsd-7597658634e050ffdda5238893fffec634272ff6.zip |
The pf table process should die if the pipe to the dhcpd process is
closed. e.g. dhcpd has been killed.
ok henning@
-rw-r--r-- | usr.sbin/dhcpd/pfutils.c | 5 |
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); |