summaryrefslogtreecommitdiff
path: root/usr.sbin/dhcpd/pfutils.c
diff options
context:
space:
mode:
authorChris Kuethe <ckuethe@cvs.openbsd.org>2007-10-06 15:45:01 +0000
committerChris Kuethe <ckuethe@cvs.openbsd.org>2007-10-06 15:45:01 +0000
commit9cd20436c701dbe11c3aae3e65c60801f188ebd2 (patch)
tree9c3708f24d12db656e0991ac76480e0f3aa2083c /usr.sbin/dhcpd/pfutils.c
parentf43a27bcdd2e851119cd0914ac28e76d39644bdb (diff)
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;