Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F111011640
D46582.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D46582.diff
View Options
diff --git a/sbin/pfctl/parse.y b/sbin/pfctl/parse.y
--- a/sbin/pfctl/parse.y
+++ b/sbin/pfctl/parse.y
@@ -517,7 +517,7 @@
%token STICKYADDRESS ENDPI MAXSRCSTATES MAXSRCNODES SOURCETRACK GLOBAL RULE
%token MAXSRCCONN MAXSRCCONNRATE OVERLOAD FLUSH SLOPPY PFLOW
%token TAGGED TAG IFBOUND FLOATING STATEPOLICY STATEDEFAULTS ROUTE SETTOS
-%token DIVERTTO DIVERTREPLY BRIDGE_TO RECEIVEDON
+%token DIVERTTO DIVERTREPLY BRIDGE_TO RECEIVEDON NE LE GE
%token <v.string> STRING
%token <v.number> NUMBER
%token <v.i> PORTBINARY
@@ -5249,10 +5249,10 @@
;
unaryop : '=' { $$ = PF_OP_EQ; }
- | '!' '=' { $$ = PF_OP_NE; }
- | '<' '=' { $$ = PF_OP_LE; }
+ | NE { $$ = PF_OP_NE; }
+ | LE { $$ = PF_OP_LE; }
| '<' { $$ = PF_OP_LT; }
- | '>' '=' { $$ = PF_OP_GE; }
+ | GE { $$ = PF_OP_GE; }
| '>' { $$ = PF_OP_GT; }
;
@@ -6630,12 +6630,19 @@
if (yylval.v.string == NULL)
err(1, "yylex: strdup");
return (STRING);
+ case '!':
+ next = lgetc(0);
+ if (next == '=')
+ return (NE);
+ lungetc(next);
+ break;
case '<':
next = lgetc(0);
if (next == '>') {
yylval.v.i = PF_OP_XRG;
return (PORTBINARY);
- }
+ } else if (next == '=')
+ return (LE);
lungetc(next);
break;
case '>':
@@ -6643,7 +6650,8 @@
if (next == '<') {
yylval.v.i = PF_OP_IRG;
return (PORTBINARY);
- }
+ } else if (next == '=')
+ return (GE);
lungetc(next);
break;
case '-':
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Feb 27, 4:48 AM (18 h, 20 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
16862674
Default Alt Text
D46582.diff (1 KB)
Attached To
Mode
D46582: pfctl: lex <=, >=, and != into a single token
Attached
Detach File
Event Timeline
Log In to Comment