summaryrefslogtreecommitdiff
path: root/sbin/pfctl
diff options
context:
space:
mode:
authorHenning Brauer <henning@cvs.openbsd.org>2002-07-05 14:07:33 +0000
committerHenning Brauer <henning@cvs.openbsd.org>2002-07-05 14:07:33 +0000
commit1b4b28f7d39a62e1b0703c860b68355872141120 (patch)
treefad6e1555f1e12de00f33a8930a51b0ad63f1f4f /sbin/pfctl
parent13f0e77c3dce5b6dce284100dcef50d6a5536b1f (diff)
allow unsetting the statusinterface via
set loginterface none ok dhartmei@
Diffstat (limited to 'sbin/pfctl')
-rw-r--r--sbin/pfctl/pfctl.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/sbin/pfctl/pfctl.c b/sbin/pfctl/pfctl.c
index 30c4d6b660d..b3afafd63e2 100644
--- a/sbin/pfctl/pfctl.c
+++ b/sbin/pfctl/pfctl.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pfctl.c,v 1.82 2002/07/01 05:28:22 deraadt Exp $ */
+/* $OpenBSD: pfctl.c,v 1.83 2002/07/05 14:07:32 henning Exp $ */
/*
* Copyright (c) 2001 Daniel Hartmeier
@@ -746,7 +746,10 @@ pfctl_set_logif(struct pfctl *pf, char *ifname)
if ((loadopt & (PFCTL_FLAG_OPTION | PFCTL_FLAG_ALL)) != 0) {
if ((pf->opts & PF_OPT_NOACTION) == 0) {
- strlcpy(pi.ifname, ifname, sizeof(pi.ifname));
+ if (!strcmp(ifname, "none"))
+ bzero(pi.ifname, sizeof(pi.ifname));
+ else
+ strlcpy(pi.ifname, ifname, sizeof(pi.ifname));
if (ioctl(pf->dev, DIOCSETSTATUSIF, &pi))
return (1);
}