diff options
author | 2012-10-10 14:27:46 +0000 | |
---|---|---|
committer | 2012-10-10 14:27:46 +0000 | |
commit | e2074aa48cc12aaf3a0e58b7af79013add4f1808 (patch) | |
tree | 4f7a71a1b5eea80c6fd6e1d4cf16b6c49e938e7b | |
parent | Add __BEGIN_DECLS so that programs using C++ can use functions (diff) | |
download | wireguard-openbsd-e2074aa48cc12aaf3a0e58b7af79013add4f1808.tar.xz wireguard-openbsd-e2074aa48cc12aaf3a0e58b7af79013add4f1808.zip |
Fix the hash http filter action to initialize the hash key correctly after
the multiple relay tables commit.
-rw-r--r-- | usr.sbin/relayd/relay_http.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/usr.sbin/relayd/relay_http.c b/usr.sbin/relayd/relay_http.c index f3ead69df45..4b67295f0fd 100644 --- a/usr.sbin/relayd/relay_http.c +++ b/usr.sbin/relayd/relay_http.c @@ -1,4 +1,4 @@ -/* $OpenBSD: relay_http.c,v 1.2 2012/10/04 20:53:30 reyk Exp $ */ +/* $OpenBSD: relay_http.c,v 1.3 2012/10/10 14:27:46 reyk Exp $ */ /* * Copyright (c) 2006 - 2012 Reyk Floeter <reyk@openbsd.org> @@ -1053,7 +1053,10 @@ relay_handle_http(struct ctl_relay_event *cre, struct protonode *proot, case NODE_ACTION_HASH: DPRINTF("%s: hash '%s: %s'", __func__, pn->key, pk->value); + if (!con->se_hashkeyset) + con->se_hashkey = HASHINIT; con->se_hashkey = hash32_str(pk->value, con->se_hashkey); + con->se_hashkeyset = 1; ret = PN_PASS; break; case NODE_ACTION_LOG: |