summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorhenning <henning@openbsd.org>2003-02-16 15:11:09 +0000
committerhenning <henning@openbsd.org>2003-02-16 15:11:09 +0000
commit60a43a620297a58592cd3c25510a3eced0a0a6e4 (patch)
tree5834e784d24939ce08956a617d3695bf136a35b9
parentSynch cxxfilt man page with reality and arrange for it to get built and (diff)
downloadwireguard-openbsd-60a43a620297a58592cd3c25510a3eced0a0a6e4.tar.xz
wireguard-openbsd-60a43a620297a58592cd3c25510a3eced0a0a6e4.zip
throw a syntax error if the portunary operator in varset is no '='
extif>"whatever" should not be the same as extif="whatever" but a syntax error.
-rw-r--r--sbin/pfctl/parse.y4
1 files changed, 3 insertions, 1 deletions
diff --git a/sbin/pfctl/parse.y b/sbin/pfctl/parse.y
index 0b416aec0db..aac06ede492 100644
--- a/sbin/pfctl/parse.y
+++ b/sbin/pfctl/parse.y
@@ -1,4 +1,4 @@
-/* $OpenBSD: parse.y,v 1.318 2003/02/14 14:38:32 dhartmei Exp $ */
+/* $OpenBSD: parse.y,v 1.319 2003/02/16 15:11:09 henning Exp $ */
/*
* Copyright (c) 2001 Markus Friedl. All rights reserved.
@@ -477,6 +477,8 @@ string : string STRING {
;
varset : STRING PORTUNARY string {
+ if ($2 != PF_OP_EQ)
+ YYERROR;
if (pf->opts & PF_OPT_VERBOSE)
printf("%s = \"%s\"\n", $1, $3);
if (symset($1, $3, 0) == -1)