summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Kuethe <ckuethe@cvs.openbsd.org>2006-06-14 14:44:40 +0000
committerChris Kuethe <ckuethe@cvs.openbsd.org>2006-06-14 14:44:40 +0000
commit52952d0c7cbf8b2d106112be4086a2b0b9f5363a (patch)
tree4dea28f77bf585aaec2b9e06eed1b7058a55e9c8
parent53c3e011c0e9b0a02a8c7ae04ba37fb4b2286574 (diff)
Avoid changing pf tables when table name is NULL
ok henning
-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 a4a69f323c7..d1fea6cdfdc 100644
--- a/usr.sbin/dhcpd/pfutils.c
+++ b/usr.sbin/dhcpd/pfutils.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pfutils.c,v 1.2 2006/05/31 14:40:14 ckuethe Exp $ */
+/* $OpenBSD: pfutils.c,v 1.3 2006/06/14 14:44:39 ckuethe Exp $ */
/*
* Copyright (c) 2006 Chris Kuethe <ckuethe@openbsd.org>
*
@@ -106,6 +106,9 @@ pf_change_table(int fd, int op, struct in_addr ip, char *table)
struct pfioc_table io;
struct pfr_addr addr;
+ if (table == NULL)
+ return;
+
bzero(&io, sizeof(io));
strlcpy(io.pfrio_table.pfrt_name, table,
sizeof(io.pfrio_table.pfrt_name));