summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--usr.sbin/httpd/config.c3
-rw-r--r--usr.sbin/httpd/parse.y37
2 files changed, 3 insertions, 37 deletions
diff --git a/usr.sbin/httpd/config.c b/usr.sbin/httpd/config.c
index 07d8e3287ac..98e06b58514 100644
--- a/usr.sbin/httpd/config.c
+++ b/usr.sbin/httpd/config.c
@@ -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>
diff --git a/usr.sbin/httpd/parse.y b/usr.sbin/httpd/parse.y
index 1b489401070..1c2c90ca121 100644
--- a/usr.sbin/httpd/parse.y
+++ b/usr.sbin/httpd/parse.y
@@ -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;
}
;