summaryrefslogtreecommitdiff
path: root/sbin/pfctl
diff options
context:
space:
mode:
authorkn <kn@cvs.openbsd.org>2019-01-29 08:56:23 +0000
committerkn <kn@cvs.openbsd.org>2019-01-29 08:56:23 +0000
commit88f8fb8aa1aacb20d73e99cd61574e42490c1ac8 (patch)
tree4b8502cad6baf1954992b7e660dbb6574591ec71 /sbin/pfctl
parent09cb1063a99b711d222f0052c0b5fdb2729cbaa5 (diff)
Make -N and -r mutually exclusive
Either disable DNS or enable additional reverse lookups, but not both. OK benno
Diffstat (limited to 'sbin/pfctl')
-rw-r--r--sbin/pfctl/pfctl.88
-rw-r--r--sbin/pfctl/pfctl.c5
2 files changed, 10 insertions, 3 deletions
diff --git a/sbin/pfctl/pfctl.8 b/sbin/pfctl/pfctl.8
index 241d9dff842..48b2893cfcd 100644
--- a/sbin/pfctl/pfctl.8
+++ b/sbin/pfctl/pfctl.8
@@ -1,4 +1,4 @@
-.\" $OpenBSD: pfctl.8,v 1.175 2019/01/26 23:00:12 kn Exp $
+.\" $OpenBSD: pfctl.8,v 1.176 2019/01/29 08:56:22 kn Exp $
.\"
.\" Copyright (c) 2001 Kjell Wooding. All rights reserved.
.\"
@@ -24,7 +24,7 @@
.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
-.Dd $Mdocdate: January 26 2019 $
+.Dd $Mdocdate: January 29 2019 $
.Dt PFCTL 8
.Os
.Sh NAME
@@ -315,6 +315,10 @@ instead of the default
Only print errors and warnings.
.It Fl r
Perform reverse DNS lookups on states and tables when displaying them.
+.Fl N
+and
+.Fl r
+are mutually exclusive.
.It Fl S Ar statefile
Store the pf state table in the file specified by
.Ar statefile .
diff --git a/sbin/pfctl/pfctl.c b/sbin/pfctl/pfctl.c
index 2dc5b54e803..c1f5ed743a3 100644
--- a/sbin/pfctl/pfctl.c
+++ b/sbin/pfctl/pfctl.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pfctl.c,v 1.367 2019/01/28 10:25:20 kn Exp $ */
+/* $OpenBSD: pfctl.c,v 1.368 2019/01/29 08:56:22 kn Exp $ */
/*
* Copyright (c) 2001 Daniel Hartmeier
@@ -2466,6 +2466,9 @@ main(int argc, char *argv[])
}
}
+ if ((opts & PF_OPT_NODNS) && (opts & PF_OPT_USEDNS))
+ errx(1, "-N and -r are mutually exclusive");
+
if (tblcmdopt == NULL ^ tableopt == NULL)
usage();