diff options
author | Pierre-Yves Ritschard <pyr@cvs.openbsd.org> | 2007-02-26 20:48:49 +0000 |
---|---|---|
committer | Pierre-Yves Ritschard <pyr@cvs.openbsd.org> | 2007-02-26 20:48:49 +0000 |
commit | 946d36888bd0fd21674e38f3bd2a333c1ce77fd9 (patch) | |
tree | 7cdd78b483b7f848dc45ca49c0e3006736b585a8 /usr.sbin/relayd/parse.y | |
parent | 41f00086fb8d0157ab67db01f1c49827e7e10073 (diff) |
kill the ``use ssl'' directive for consistency across parser directives.
another heads up for testers: you need to change configuration files.
ok reyk@
Diffstat (limited to 'usr.sbin/relayd/parse.y')
-rw-r--r-- | usr.sbin/relayd/parse.y | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/usr.sbin/relayd/parse.y b/usr.sbin/relayd/parse.y index f4547948e00..f978c48f3e3 100644 --- a/usr.sbin/relayd/parse.y +++ b/usr.sbin/relayd/parse.y @@ -1,4 +1,4 @@ -/* $OpenBSD: parse.y,v 1.31 2007/02/26 19:58:04 pyr Exp $ */ +/* $OpenBSD: parse.y,v 1.32 2007/02/26 20:48:48 pyr Exp $ */ /* * Copyright (c) 2006 Pierre-Yves Ritschard <pyr@spootnik.org> @@ -107,14 +107,14 @@ typedef struct { %token CHECK TCP ICMP EXTERNAL %token TIMEOUT CODE DIGEST PORT TAG INTERFACE %token VIRTUAL INTERVAL DISABLE STICKYADDR BACKLOG -%token SEND EXPECT NOTHING USE SSL LOADBALANCE ROUNDROBIN CIPHERS +%token SEND EXPECT NOTHING SSL LOADBALANCE ROUNDROBIN CIPHERS %token RELAY LISTEN ON FORWARD TO NAT LOOKUP PREFORK NO MARK MARKED %token PROTO SESSION CACHE APPEND CHANGE REMOVE FROM FILTER HASH HEADER %token LOG UPDATES ALL DEMOTE NODELAY SACK SOCKET BUFFER URL RETRY %token ERROR %token <v.string> STRING %type <v.string> interface -%type <v.number> number port http_type loglevel sslcache +%type <v.number> number port http_type loglevel sslcache optssl %type <v.number> proto_type dstmode docheck retry log flag %type <v.host> host %type <v.tv> timeout @@ -146,6 +146,10 @@ number : STRING { } ; +optssl : /*empty*/ { $$ = 0; } + | SSL { $$ = 1; } + ; + http_type : STRING { if (strcmp("https", $1) == 0) { $$ = 1; @@ -478,8 +482,12 @@ tableoptsl : host { } free($5); } - | CHECK SEND sendbuf EXPECT STRING { + | CHECK SEND sendbuf EXPECT STRING optssl { table->check = CHECK_SEND_EXPECT; + if ($6) { + conf->flags |= F_SSL; + table->flags |= F_SSL; + } if (strlcpy(table->exbuf, $5, sizeof(table->exbuf)) >= sizeof(table->exbuf)) { yyerror("yyparse: expect buffer truncated"); @@ -508,10 +516,6 @@ tableoptsl : host { } } | DISABLE { table->flags |= F_DISABLE; } - | USE SSL { - table->flags |= F_SSL; - conf->flags |= F_SSL; - } ; proto : PROTO STRING { @@ -824,7 +828,7 @@ relayopts_l : relayopts_l relayoptsl nl | relayoptsl optnl ; -relayoptsl : LISTEN ON STRING port sslserv { +relayoptsl : LISTEN ON STRING port optssl { struct addresslist al; struct address *h; @@ -844,6 +848,10 @@ relayoptsl : LISTEN ON STRING port sslserv { h = TAILQ_FIRST(&al); bcopy(&h->ss, &rlay->ss, sizeof(rlay->ss)); rlay->port = h->port; + if ($5) { + rlay->flags |= F_SSL; + conf->flags |= F_SSL; + } } | FORWARD TO STRING port { struct addresslist al; @@ -933,13 +941,6 @@ docheck : /* empty */ { $$ = 1; } | NO CHECK { $$ = 0; } ; -sslserv : /* empty */ - | SSL { - rlay->flags |= F_SSL; - conf->flags |= F_SSL; - } - ; - interface : /*empty*/ { $$ = NULL; } | INTERFACE STRING { $$ = $2; } ; @@ -1096,7 +1097,6 @@ lookup(char *s) { "to", TO }, { "updates", UPDATES }, { "url", URL }, - { "use", USE }, { "virtual", VIRTUAL } }; const struct keywords *p; |