No need to include pfvar.h, another leftover from relayd. It was also
authorreyk <reyk@openbsd.org>
Mon, 19 Jan 2015 21:07:33 +0000 (21:07 +0000)
committerreyk <reyk@openbsd.org>
Mon, 19 Jan 2015 21:07:33 +0000 (21:07 +0000)
used for portrange operators which weren't used in httpd.

OK florian@

usr.sbin/httpd/config.c
usr.sbin/httpd/parse.y

index 07d8e32..98e06b5 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: config.c,v 1.30 2015/01/19 19:37:50 reyk Exp $        */
+/*     $OpenBSD: config.c,v 1.31 2015/01/19 21:07:33 reyk Exp $        */
 
 /*
  * Copyright (c) 2011 - 2015 Reyk Floeter <reyk@openbsd.org>
@@ -23,7 +23,6 @@
 #include <sys/uio.h>
 
 #include <net/if.h>
-#include <net/pfvar.h>
 #include <netinet/in.h>
 #include <net/route.h>
 
index 1b48940..1c2c90c 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: parse.y,v 1.56 2015/01/19 19:37:50 reyk Exp $ */
+/*     $OpenBSD: parse.y,v 1.57 2015/01/19 21:07:33 reyk Exp $ */
 
 /*
  * Copyright (c) 2007 - 2015 Reyk Floeter <reyk@openbsd.org>
@@ -32,7 +32,6 @@
 #include <sys/ioctl.h>
 
 #include <net/if.h>
-#include <net/pfvar.h>
 #include <netinet/in.h>
 #include <arpa/inet.h>
 #include <net/route.h>
@@ -369,11 +368,6 @@ serveroptsl        : LISTEN ON STRING opttls port {
                                s_conf = alias;
                        } else
                                s_conf = &srv->srv_conf;
-                       if ($5.op != PF_OP_EQ) {
-                               yyerror("invalid port");
-                               free($3);
-                               YYERROR;
-                       }
 
                        TAILQ_INIT(&al);
                        if (host($3, &al, 1, &$5, NULL, -1) <= 0) {
@@ -901,39 +895,12 @@ medianamesl       : numberstring                          {
                }
                ;
 
-port           : PORT STRING {
-                       char            *a, *b;
-                       int              p[2];
-
-                       p[0] = p[1] = 0;
-
-                       a = $2;
-                       b = strchr($2, ':');
-                       if (b == NULL)
-                               $$.op = PF_OP_EQ;
-                       else {
-                               *b++ = '\0';
-                               if ((p[1] = getservice(b)) == -1) {
-                                       free($2);
-                                       YYERROR;
-                               }
-                               $$.op = PF_OP_RRG;
-                       }
-                       if ((p[0] = getservice(a)) == -1) {
-                               free($2);
-                               YYERROR;
-                       }
-                       $$.val[0] = p[0];
-                       $$.val[1] = p[1];
-                       free($2);
-               }
-               | PORT NUMBER {
+port           : PORT NUMBER {
                        if ($2 <= 0 || $2 >= (int)USHRT_MAX) {
                                yyerror("invalid port: %lld", $2);
                                YYERROR;
                        }
                        $$.val[0] = htons($2);
-                       $$.op = PF_OP_EQ;
                }
                ;