summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorckuethe <ckuethe@openbsd.org>2006-06-14 14:44:39 +0000
committerckuethe <ckuethe@openbsd.org>2006-06-14 14:44:39 +0000
commit08a8b7bd64f84ecef847cf46ef2d49538840bc2c (patch)
tree85931f8edce7341defc0f35e50d732357e87f223
parentadd cvs_buf_load_fd() which does the same as cvs_buf_load() (diff)
downloadwireguard-openbsd-08a8b7bd64f84ecef847cf46ef2d49538840bc2c.tar.xz
wireguard-openbsd-08a8b7bd64f84ecef847cf46ef2d49538840bc2c.zip
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));