From d06a75acba9c8e0f14642049428cf479895b1265 Mon Sep 17 00:00:00 2001 From: Bret Lambert Date: Fri, 5 Sep 2014 10:19:27 +0000 Subject: revert previous; was based on a work-in-progress, as well as being an incomplete and therefore incorrect adaptation apologies to anybody who got bitten by this mistake ok reyk@ --- usr.sbin/relayd/parse.y | 19 ++++--------------- 1 file changed, 4 insertions(+), 15 deletions(-) (limited to 'usr.sbin/relayd/parse.y') diff --git a/usr.sbin/relayd/parse.y b/usr.sbin/relayd/parse.y index ff90a86d776..5e7aa64ce32 100644 --- a/usr.sbin/relayd/parse.y +++ b/usr.sbin/relayd/parse.y @@ -1,4 +1,4 @@ -/* $OpenBSD: parse.y,v 1.188 2014/08/29 09:03:36 blambert Exp $ */ +/* $OpenBSD: parse.y,v 1.189 2014/09/05 10:19:26 blambert Exp $ */ /* * Copyright (c) 2007 - 2014 Reyk Floeter @@ -119,8 +119,6 @@ static enum key_type keytype = KEY_TYPE_NONE; static enum direction dir = RELAY_DIR_ANY; static char *rulefile = NULL; -static u_int32_t hashseed = 0; - struct address *host_v4(const char *); struct address *host_v6(const char *); int host_dns(const char *, struct addresslist *, @@ -170,7 +168,7 @@ typedef struct { %token SOCKET SPLICE SSL STICKYADDR STYLE TABLE TAG TAGGED TCP TIMEOUT TO %token ROUTER RTLABEL TRANSPARENT TRAP UPDATES URL VIRTUAL WITH TTL RTABLE %token MATCH PARAMS RANDOM LEASTSTATES SRCHASH KEY CERTIFICATE PASSWORD ECDH -%token EDH CURVE SEED +%token EDH CURVE %token STRING %token NUMBER %type hostname interface table value optstring @@ -179,7 +177,7 @@ typedef struct { %type optssl optsslclient sslcache %type redirect_proto relay_proto match %type action ruleaf key_option -%type ssldhparams sslecdhcurve hashseed +%type ssldhparams sslecdhcurve %type port %type host %type address @@ -730,7 +728,7 @@ tableopts : CHECK tablecheck table->conf.skip_cnt = ($2 / conf->sc_interval.tv_sec) - 1; } - | MODE dstmode hashseed { + | MODE dstmode { switch ($2) { case RELAY_DSTMODE_LOADBALANCE: case RELAY_DSTMODE_HASH: @@ -741,7 +739,6 @@ tableopts : CHECK tablecheck "for redirections"); YYERROR; } - table->conf.hash_seed = $3; /* FALLTHROUGH */ case RELAY_DSTMODE_ROUNDROBIN: dstmode = $2; @@ -758,9 +755,6 @@ tableopts : CHECK tablecheck } ; -hashseed : /* nothing */ { $$ = hashseed; } - | SEED STRING { $$ = hash32_str($2, HASHINIT); } - tablecheck : ICMP { table->conf.check = CHECK_ICMP; } | TCP { table->conf.check = CHECK_TCP; } | SSL { @@ -1733,7 +1727,6 @@ forwardspec : STRING port retry { rlt->rlt_table->conf.flags |= F_USED; rlt->rlt_mode = dstmode; rlt->rlt_flags = F_USED; - rlt->rlt_key = rlt->rlt_table->conf.hash_seed; if (!TAILQ_EMPTY(&rlay->rl_tables)) rlt->rlt_flags |= F_BACKUP; @@ -2157,7 +2150,6 @@ lookup(char *s) { "rtlabel", RTLABEL }, { "sack", SACK }, { "script", SCRIPT }, - { "seed", SEED }, { "send", SEND }, { "session", SESSION }, { "set", SET }, @@ -2552,9 +2544,6 @@ load_config(const char *filename, struct relayd *x_conf) conf = x_conf; conf->sc_flags = 0; - while (hashseed == 0) - hashseed = arc4random(); - loadcfg = 1; errors = 0; last_host_id = last_table_id = last_rdr_id = last_proto_id = -- cgit v1.2.3