summaryrefslogtreecommitdiffstats
path: root/usr.sbin/dhcpd/pfutils.c
diff options
context:
space:
mode:
authorckuethe <ckuethe@openbsd.org>2007-10-06 15:45:00 +0000
committerckuethe <ckuethe@openbsd.org>2007-10-06 15:45:00 +0000
commite669f95e78ba8f03cee46b5e1e6b7f01d337d221 (patch)
tree1081dc812669c6e6cf9eae7ebd302df552f11cfe /usr.sbin/dhcpd/pfutils.c
parentProvide <machine/lock.h> on hppa64 too. (diff)
downloadwireguard-openbsd-e669f95e78ba8f03cee46b5e1e6b7f01d337d221.tar.xz
wireguard-openbsd-e669f95e78ba8f03cee46b5e1e6b7f01d337d221.zip
Allow the various pf table actions to operate independently. For example,
"-L leased" wouldn't work without "-A abandoned". testing help from merdely "i like" deraadt
Diffstat (limited to 'usr.sbin/dhcpd/pfutils.c')
-rw-r--r--usr.sbin/dhcpd/pfutils.c22
1 files changed, 6 insertions, 16 deletions
diff --git a/usr.sbin/dhcpd/pfutils.c b/usr.sbin/dhcpd/pfutils.c
index 6d806fa80e1..5c2034bc3d5 100644
--- a/usr.sbin/dhcpd/pfutils.c
+++ b/usr.sbin/dhcpd/pfutils.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pfutils.c,v 1.7 2007/05/15 06:22:32 tedu Exp $ */
+/* $OpenBSD: pfutils.c,v 1.8 2007/10/06 15:45:00 ckuethe Exp $ */
/*
* Copyright (c) 2006 Chris Kuethe <ckuethe@openbsd.org>
*
@@ -234,24 +234,14 @@ pfmsg(char c, struct lease *lp)
switch (c) {
case 'A': /* address is being abandoned */
- if (abandoned_tab != NULL)
- (void)atomicio(vwrite, pfpipe[1], &cmd,
- sizeof(struct pf_cmd));
- break;
+ /* FALLTHROUGH */
case 'C': /* IP moved to different ethernet address */
- if (changedmac_tab != NULL)
- (void)atomicio(vwrite, pfpipe[1], &cmd,
- sizeof(struct pf_cmd));
- break;
+ /* FALLTHROUGH */
case 'L': /* Address is being leased (unabandoned) */
- if (abandoned_tab != NULL)
- (void)atomicio(vwrite, pfpipe[1], &cmd,
- sizeof(struct pf_cmd));
- break;
+ /* FALLTHROUGH */
case 'R': /* Address is being released or lease has expired */
- if (leased_tab != NULL)
- (void)atomicio(vwrite, pfpipe[1], &cmd,
- sizeof(struct pf_cmd));
+ (void)atomicio(vwrite, pfpipe[1], &cmd,
+ sizeof(struct pf_cmd));
break;
default: /* silently ignore unknown commands */
break;